ayuda con aplicacion de receta de cocina

Pregunta Sin Miedo no te cortes cualquier cosa para empezar - Autoit se comienza facilmente.Para Ordenes o Comandos sueltos. Ver nota como preguntar.
Responder
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

hola de nuevo , ahora tengo otro imcomveniente , le hice a mi esposa esta aplicacion con exemplo de otro claro esta mis conocimientos no dan para tanto jajaja .. bueno el caso es una aplicacion para ella poner las recetas d la cocina , y cuando las desee ver las busque y la lea desde ahi , el caso es queria hacerle varias modificaciones al script pero como mis conocimientos no llegan para tanto , pedire ayudita , queria ve r si podia cambiarle el fondo de la aplicacion , no donde escribo , sino las otras partes , y otra cosa , si se agregar al script , un osk externo , no el de la pc , sino uno externo que uso , como el monitor es touch screen


#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Include <Array.au3>

$GUI = GUICreate("RECIPES", 800, 500, 0 ,0, $WS_POPUP ) ;CUADRO TOTAL TAMANO CON FRAMELESS



GUICtrlCreateLabel("INGREDIENTES",220,65,80,20);Label INGREDIENTES Top section
GUICtrlSetColor(-1, 0xff0000)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("PREPARACION",220,235,80,20);Label PREPARACION Top section
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)


$NewRecipeButton = GUICtrlCreateButton("New Recipe", 40, 0, 125, 42, $WS_GROUP) ;TAMANO Y POSICION DEL BOTON DE NEW RECIPE
GUICtrlSetFont(-1, 11, 800, 2, "HandelGotDL") ;TAMANO DE LETRA DEL BOTON DE NEW RECIPE
$RecipeListBox = GUICtrlCreateList("", 10, 45, 200, 450) ;TAMANO Y UBICACION DEL CUADRO DE LIST
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") ;TAMANO DE LETRA DE LIST

$TitleInput = GUICtrlCreateInput("", 270, 15, 335, 30) ;TAMANO Y UBICACION CUADRO TITULO
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")




Dim $Ing[11]
Dim $Q[11]
Dim $QT[11]

$Ing[1] = GUICtrlCreateInput("", 265, 80, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[1] = GUICtrlCreateInput("", 220, 80, 40, 25)


$Ing[2] = GUICtrlCreateInput("", 265, 105, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[2] = GUICtrlCreateInput("", 220, 105, 40, 25)


$Ing[3] = GUICtrlCreateInput("", 265, 130, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[3] = GUICtrlCreateInput("", 220, 130, 40, 25)


$Ing[4] = GUICtrlCreateInput("", 265, 155, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[4] = GUICtrlCreateInput("", 220, 155, 40, 25)


$Ing[5] = GUICtrlCreateInput("", 265, 180, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[5] = GUICtrlCreateInput("", 220, 180, 40, 25)


$Ing[6] = GUICtrlCreateInput("", 500, 80, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[6] = GUICtrlCreateInput("", 455, 80, 40, 25)


$Ing[7] = GUICtrlCreateInput("", 500, 105, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[7] = GUICtrlCreateInput("", 455, 105, 40, 25)


$Ing[8] = GUICtrlCreateInput("", 500, 130, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[8] = GUICtrlCreateInput("", 455, 130, 40, 25)


$Ing[9] = GUICtrlCreateInput("", 500, 155, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[9] = GUICtrlCreateInput("", 455, 155, 40, 25)

$Ing[10] = GUICtrlCreateInput("", 500, 180, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[10] = GUICtrlCreateInput("", 455, 180, 40, 25)

$InstructionBox = GUICtrlCreateEdit("", 220, 250, 500, 200, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) ; CUADRO DE PREPARAION
GUICtrlSetFont(-1, 13, 400, 2, "Times New Roman")

$SaveButton = GUICtrlCreateButton("Save", 280, 453, 165, 42, $WS_GROUP) ; BOTON DE SAVE
GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ; LETRA DEL BOTON DE SAVE


$DiscardButton = GUICtrlCreateButton("Discard", 495, 453, 165, 42, $WS_GROUP) ; BOTON DE DISCAR
GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ; LETRA DEL BOTON DE DISCAR
LoadFirstRecipe()
RecipeListBoxRefresh()
GUISetState(@SW_SHOW)


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $RecipeListBox
LoadRecipe()
Case $NewRecipeButton
NewRecipe()
Case $SaveButton
SaveRecipe()
Case $DiscardButton
Discard()
EndSwitch
WEnd

Func NewRecipe()
$SaveTitleData = GUICtrlRead($TitleInput)
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
ResetInputs()
Else
$ForgotSaveMsgBox = MsgBox(4, "Save?", "Before you go on, do you want to save this " & $SaveTitleData & " recipe?")
If $ForgotSaveMsgBox = 6 then
WriteSaveFile()
ResetInputs()
Else
ResetInputs()
EndIf
EndIf
EndFunc

Func ResetInputs()
GUICtrlSetData($TitleInput, "")
For $Number = 1 to 10
GUICtrlSetData($Ing[$Number], "")
GUICtrlSetData($Q[$Number], "")

Next
GUICtrlSetData($InstructionBox, "")
EndFunc

Func SaveRecipe()
$SaveTitleData = GUICtrlRead($TitleInput)
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
$OverwriteMsgBox = MsgBox(4, "Overwrite?", "Do you want to overwrite your other " & $SaveTitleData & " recipe?")
If $OverwriteMsgBox = 6 then
FileDelete(@ScriptDir & "\PB-" & $SaveTitleData & ".txt")
WriteSaveFile()
EndIf
Else
WriteSaveFile()
EndIf
EndFunc

Func WriteSaveFile()
$SaveTitleData = GUICtrlRead($TitleInput)
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveTitleData & @TAB)

For $Number = 1 to 10
$SaveIngData = GUICtrlRead($Ing[$Number])
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveIngData & @TAB)
$SaveQData = GUICtrlRead($Q[$Number])
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveQData & @TAB)
$SaveQTData = GUICtrlRead($QT[$Number])
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveQTData & @TAB)
Next

$SaveInstructionData = GUICtrlRead($InstructionBox)
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveInstructionData)

If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
MsgBox(0, "Success!", "Your " & $SaveTitleData & " recipe has been saved.")
RecipeListBoxRefresh()
EndIf
EndFunc

Func RecipeListBoxRefresh()
GUICtrlSetData($RecipeListBox, "")
$FileSearch = FileFindFirstFile("SB-*.*")
While 1
$RecipeFile = FileFindNextFile($FileSearch)
If @Error Then ExitLoop
GUICtrlSetData($RecipeListBox, $RecipeFile & "|")
WEnd
FileClose($FileSearch)
EndFunc

Func LoadFirstRecipe()
GUICtrlSetData($RecipeListBox, "")
$FileSearch = FileFindFirstFile("SB-*.*")
$RecipeFile = FileFindNextFile($FileSearch)
If @Error Then
MsgBox(0, "No recipes!", "You don't have any recipes yet.")
Else
$LoadData=FileRead(@ScriptDir & "\" & $RecipeFile )
$LoadData = StringSplit($LoadData, @TAB)

GUICtrlSetData($TitleInput, $LoadData[1])
For $Number = 1 to 10
$ArrayNumber=3 * $Number - 1
GUICtrlSetData($Ing[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number
GUICtrlSetData($Q[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number + 1
GUICtrlSetData($QT[$Number], $LoadData[$ArrayNumber])
Next
GUICtrlSetData($InstructionBox, $LoadData[32])
EndIf
EndFunc

Func LoadRecipe()
$SaveTitleData = GUICtrlRead($TitleInput)
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
LoadSaveFile()
Else
$ForgotSaveMsgBox = MsgBox(4, "Save?", "Before you go on, do you want to save this " & $SaveTitleData & " recipe?")
If $ForgotSaveMsgBox = 6 then
SaveRecipe()
LoadSaveFile()
Else
LoadSaveFile()
EndIf
EndIf
EndFunc

Func LoadSaveFile()
$RecipePressed = GUICtrlRead($RecipeListBox)
$LoadData=FileRead(@ScriptDir & "\" & $RecipePressed )
$LoadData = StringSplit($LoadData, @TAB)

GUICtrlSetData($TitleInput, $LoadData[1])
For $Number = 1 to 10
$ArrayNumber=3 * $Number - 1
GUICtrlSetData($Ing[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number
GUICtrlSetData($Q[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number + 1
GUICtrlSetData($QT[$Number], $LoadData[$ArrayNumber])
Next
GUICtrlSetData($InstructionBox, $LoadData[32])
EndFunc

Func Discard()
$SaveTitleData = GUICtrlRead($TitleInput)
$DeleteMsgBox = MsgBox(4, "Delete?", "Are you sure you want to delete your " & $SaveTitleData & " recipe?")
If $DeleteMsgBox = 6 Then
ResetInputs()
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") then FileDelete(@ScriptDir & "\SB-" & $SaveTitleData & ".txt")
RecipeListBoxRefresh()
EndIf
EndFunc
Avatar de Usuario
Dany
Profesional del Autoit
Mensajes: 651
Registrado: 28 Mar 2012, 22:49

Re: ayuda con aplicacion de receta de cocina

Mensaje por Dany »

se coloca asi:

Código: Seleccionar todo

$GUI = GUICreate("RECIPES", 800, 500, 0 ,0) ;CUADRO TOTAL TAMANO CON FRAMELESS
GUICtrlCreatePic('rutaia_mgen.jpg', 0, 0, 0, 0)
GUICtrlSetState(-1, $GUI_DISABLE)

lo ultimo no lo entendí. lo del osk externo :S


saludos
  • ............................................Imagen
    ......................................Imagen
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

dany mil gracias , perfecto ,si en caso que lo quiera poner trasparente , se puede , como donde yo lo abro tengo un fondo , se puede poner este script transparente asi sale se resalta el otro fondo ...

lo del teclado te explico mejor , no se si conoscas el programa roadrunner , ahora se llama riderunner , es un frondend , que se usa para computadoras de los carros , bueno e caso que yo estoy usando ese programa , y estas aplicaciones las llamo atraves de este programa , pero como el monitor donde lo uso es touch screen , y este programa viene con su propio teclado , queria usar el telcado de ese programa ... el programa que te digo roadrunner , es de la pagina mp3car.com
Avatar de Usuario
Dany
Profesional del Autoit
Mensajes: 651
Registrado: 28 Mar 2012, 22:49

Re: ayuda con aplicacion de receta de cocina

Mensaje por Dany »

Quieres algo asi?

Código: Seleccionar todo

#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Include <Array.au3>

$GUI = GUICreate("RECIPES", 800, 500, -1,-1, $WS_POPUP ) ;CUADRO TOTAL TAMANO CON FRAMELESS



GUICtrlCreateLabel("INGREDIENTES",220,65,80,20);Label INGREDIENTES Top section
GUICtrlSetColor(-1, 0xff0000)

GUICtrlCreateLabel("PREPARACION",220,235,80,20);Label PREPARACION Top section
GUICtrlSetColor(-1, 0xFF0000)



$NewRecipeButton = GUICtrlCreateButton("New Recipe", 40, 0, 125, 42, $WS_GROUP) ;TAMANO Y POSICION DEL BOTON DE NEW RECIPE
GUICtrlSetFont(-1, 11, 800, 2, "HandelGotDL") ;TAMANO DE LETRA DEL BOTON DE NEW RECIPE
$RecipeListBox = GUICtrlCreateList("", 10, 45, 200, 450) ;TAMANO Y UBICACION DEL CUADRO DE LIST
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") ;TAMANO DE LETRA DE LIST

$TitleInput = GUICtrlCreateInput("", 270, 15, 335, 30) ;TAMANO Y UBICACION CUADRO TITULO
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")




Dim $Ing[11]
Dim $Q[11]
Dim $QT[11]

$Ing[1] = GUICtrlCreateInput("", 265, 80, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[1] = GUICtrlCreateInput("", 220, 80, 40, 25)


$Ing[2] = GUICtrlCreateInput("", 265, 105, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[2] = GUICtrlCreateInput("", 220, 105, 40, 25)


$Ing[3] = GUICtrlCreateInput("", 265, 130, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[3] = GUICtrlCreateInput("", 220, 130, 40, 25)


$Ing[4] = GUICtrlCreateInput("", 265, 155, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[4] = GUICtrlCreateInput("", 220, 155, 40, 25)


$Ing[5] = GUICtrlCreateInput("", 265, 180, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[5] = GUICtrlCreateInput("", 220, 180, 40, 25)


$Ing[6] = GUICtrlCreateInput("", 500, 80, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[6] = GUICtrlCreateInput("", 455, 80, 40, 25)


$Ing[7] = GUICtrlCreateInput("", 500, 105, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[7] = GUICtrlCreateInput("", 455, 105, 40, 25)


$Ing[8] = GUICtrlCreateInput("", 500, 130, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[8] = GUICtrlCreateInput("", 455, 130, 40, 25)


$Ing[9] = GUICtrlCreateInput("", 500, 155, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[9] = GUICtrlCreateInput("", 455, 155, 40, 25)

$Ing[10] = GUICtrlCreateInput("", 500, 180, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[10] = GUICtrlCreateInput("", 455, 180, 40, 25)

$InstructionBox = GUICtrlCreateEdit("", 220, 250, 500, 200, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) ; CUADRO DE PREPARAION
GUICtrlSetFont(-1, 13, 400, 2, "Times New Roman")

$SaveButton = GUICtrlCreateButton("Save", 280, 453, 165, 42, $WS_GROUP) ; BOTON DE SAVE
GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ; LETRA DEL BOTON DE SAVE


$DiscardButton = GUICtrlCreateButton("Discard", 495, 453, 165, 42, $WS_GROUP) ; BOTON DE DISCAR
GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ; LETRA DEL BOTON DE DISCAR
LoadFirstRecipe()
RecipeListBoxRefresh()
GUISetControlsVisible($GUI)
GUISetState(@SW_SHOW)


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $RecipeListBox
LoadRecipe()
Case $NewRecipeButton
NewRecipe()
Case $SaveButton
SaveRecipe()
Case $DiscardButton
Discard()
EndSwitch
WEnd

Func NewRecipe()
$SaveTitleData = GUICtrlRead($TitleInput)
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
ResetInputs()
Else
$ForgotSaveMsgBox = MsgBox(4, "Save?", "Before you go on, do you want to save this " & $SaveTitleData & " recipe?")
If $ForgotSaveMsgBox = 6 then
WriteSaveFile()
ResetInputs()
Else
ResetInputs()
EndIf
EndIf
EndFunc

Func ResetInputs()
GUICtrlSetData($TitleInput, "")
For $Number = 1 to 10
GUICtrlSetData($Ing[$Number], "")
GUICtrlSetData($Q[$Number], "")

Next
GUICtrlSetData($InstructionBox, "")
EndFunc

Func SaveRecipe()
$SaveTitleData = GUICtrlRead($TitleInput)
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
$OverwriteMsgBox = MsgBox(4, "Overwrite?", "Do you want to overwrite your other " & $SaveTitleData & " recipe?")
If $OverwriteMsgBox = 6 then
FileDelete(@ScriptDir & "\PB-" & $SaveTitleData & ".txt")
WriteSaveFile()
EndIf
Else
WriteSaveFile()
EndIf
EndFunc

Func WriteSaveFile()
$SaveTitleData = GUICtrlRead($TitleInput)
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveTitleData & @TAB)

For $Number = 1 to 10
$SaveIngData = GUICtrlRead($Ing[$Number])
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveIngData & @TAB)
$SaveQData = GUICtrlRead($Q[$Number])
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveQData & @TAB)
$SaveQTData = GUICtrlRead($QT[$Number])
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveQTData & @TAB)
Next

$SaveInstructionData = GUICtrlRead($InstructionBox)
FileWrite(@ScriptDir & "\SB-" & $SaveTitleData & ".txt", $SaveInstructionData)

If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
MsgBox(0, "Success!", "Your " & $SaveTitleData & " recipe has been saved.")
RecipeListBoxRefresh()
EndIf
EndFunc

Func RecipeListBoxRefresh()
GUICtrlSetData($RecipeListBox, "")
$FileSearch = FileFindFirstFile("SB-*.*")
While 1
$RecipeFile = FileFindNextFile($FileSearch)
If @Error Then ExitLoop
GUICtrlSetData($RecipeListBox, $RecipeFile & "|")
WEnd
FileClose($FileSearch)
EndFunc

Func LoadFirstRecipe()
GUICtrlSetData($RecipeListBox, "")
$FileSearch = FileFindFirstFile("SB-*.*")
$RecipeFile = FileFindNextFile($FileSearch)
If @Error Then
MsgBox(0, "No recipes!", "You don't have any recipes yet.")
Else
$LoadData=FileRead(@ScriptDir & "\" & $RecipeFile )
$LoadData = StringSplit($LoadData, @TAB)

GUICtrlSetData($TitleInput, $LoadData[1])
For $Number = 1 to 10
$ArrayNumber=3 * $Number - 1
GUICtrlSetData($Ing[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number
GUICtrlSetData($Q[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number + 1
GUICtrlSetData($QT[$Number], $LoadData[$ArrayNumber])
Next
GUICtrlSetData($InstructionBox, $LoadData[32])
EndIf
EndFunc

Func LoadRecipe()
$SaveTitleData = GUICtrlRead($TitleInput)
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") Then
LoadSaveFile()
Else
$ForgotSaveMsgBox = MsgBox(4, "Save?", "Before you go on, do you want to save this " & $SaveTitleData & " recipe?")
If $ForgotSaveMsgBox = 6 then
SaveRecipe()
LoadSaveFile()
Else
LoadSaveFile()
EndIf
EndIf
EndFunc

Func LoadSaveFile()
$RecipePressed = GUICtrlRead($RecipeListBox)
$LoadData=FileRead(@ScriptDir & "\" & $RecipePressed )
$LoadData = StringSplit($LoadData, @TAB)

GUICtrlSetData($TitleInput, $LoadData[1])
For $Number = 1 to 10
$ArrayNumber=3 * $Number - 1
GUICtrlSetData($Ing[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number
GUICtrlSetData($Q[$Number], $LoadData[$ArrayNumber])
$ArrayNumber=3 * $Number + 1
GUICtrlSetData($QT[$Number], $LoadData[$ArrayNumber])
Next
GUICtrlSetData($InstructionBox, $LoadData[32])
EndFunc

Func Discard()
$SaveTitleData = GUICtrlRead($TitleInput)
$DeleteMsgBox = MsgBox(4, "Delete?", "Are you sure you want to delete your " & $SaveTitleData & " recipe?")
If $DeleteMsgBox = 6 Then
ResetInputs()
If FileExists(@ScriptDir & "\SB-" & $SaveTitleData & ".txt") then FileDelete(@ScriptDir & "\SB-" & $SaveTitleData & ".txt")
RecipeListBoxRefresh()
EndIf
EndFunc

Func GUISetControlsVisible($hWnd) ; By Melba23.
    Local $aControlGetPos = 0, $hCreateRect = 0, $hRectRgn = _WinAPI_CreateRectRgn(0, 0, 0, 0)
    Local $iLastControlID = _WinAPI_GetDlgCtrlID(GUICtrlGetHandle(-1))

    For $i = 3 To $iLastControlID
        $aControlGetPos = ControlGetPos($hWnd, '', $i)
        If IsArray($aControlGetPos) = 0 Then ContinueLoop
        $hCreateRect = _WinAPI_CreateRectRgn($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[0] + $aControlGetPos[2], $aControlGetPos[1] + $aControlGetPos[3])
        _WinAPI_CombineRgn($hRectRgn, $hCreateRect, $hRectRgn, 2)
        _WinAPI_DeleteObject($hCreateRect)
    Next
    _WinAPI_SetWindowRgn($hWnd, $hRectRgn, True)
    _WinAPI_DeleteObject($hRectRgn)
EndFunc   ;==>GUISetControlsVisible


Bueno si lo que dices tiene software (2000 / XP / 2003 / Vista / 2008 / Windows 7 / 2008 R2) deberia ser compatible incluso el touch y el teclado.


Saludos
  • ............................................Imagen
    ......................................Imagen
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

perfecto dany , si asi trasparente , para que se vea el fondo del programa principal , el roadtunner , que como lo hice con fondo cambiarble osea que yo le puedo cam,biar el fondo , por el que yo guste .... dany una consulta , si ves el script el tiene tres botones , de new recipe , save y discard ,esos botones son similar a los que usa wiundows , pero cuando yo lo corro atraves d mi programa , yo tengo el diseno de unos botones , aqui te pongo una foto de una parte del skin , entonces se puede abrir este script pero que no tenga botones , entonces los botones ponerselo en la pantalla que el se abra pero son del otro porgrama pero que los botones externos esten conectados con el script este , no se si me entendistes , osea que yo use mi propios botones , no los del script ... si te fijas en la foto , los botones cuando estan off , son negros , cuando lo presiono se ponen rojo ... oye mil gracias dany
Adjuntos
4.jpg
4.jpg (215.67 KiB) Visto 12180 veces
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

dany prove el script transparente en el programa donde el debe correr , pero no sale transparente , sale normal , parece que no son compatibles esa funcion de transparente y donde lo corro fijate
Adjuntos
5.jpg
5.jpg (88.44 KiB) Visto 12179 veces
Avatar de Usuario
Dany
Profesional del Autoit
Mensajes: 651
Registrado: 28 Mar 2012, 22:49

Re: ayuda con aplicacion de receta de cocina

Mensaje por Dany »

LA verdad no se porque no funcione quizás esa versión de Xp no soporta eso. pues si la skin la hiciste vos. colocasela al el script. claro si esta hecho en autoit el otro soft.
  • ............................................Imagen
    ......................................Imagen
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

pues si la verdad no se pprque no trabaja , afuera si hace lo transparente , pero cuando lo llamo con este programa , sale como ves en la foto .....

me han surgido 3 imcomvenientes ....

lo del teclado externo no se si lo entendistes , dejame ponerte una foto del teclado del programa , es que esta pc que usare todo esto no tendra ni mouse ni techado , todo es por la pantalla .....

otra cosa , no se si se podra lo de los botones , usar botones externos y que tengan relacion con este script , o se me ocurre si se puede cambiar el color de los botones a como los uso yo en el skin mio , si te fijas los botones son negros y gris arriba , para off , y cuando click , se ponen negro con rojo arriba , es cosa que se paresca mas este script a parte del skin , no se cual option se podra hacer

lo otro no se si has provado el script , bueno cuando uno agrega una receta , le das a save , entonces el sale un popup confirmando que se salvo la nueva receta y asi , cuando ya esta la receta e intentas agfregarla , te sale otro popup para si quieres volverla a savar arriba , bueno , cuando yo llamo el scrit con el otro programa , y salen esos popup , no me da tiempo a pinchar esos popup , se me ponen detras del programa ... no se de que manera se agregara eso , estuve leyendo que se puede agregar skin externo a un script de autoit , pues no se si haciendolo igual que e que ya tengo asi paresca parte del programa
Adjuntos
6.jpg
6.jpg (206.6 KiB) Visto 12169 veces
Avatar de Usuario
Chefito
Profesional del Autoit
Mensajes: 2035
Registrado: 21 Feb 2008, 18:42
Ubicación: Albacete/Cuenca (España)

Re: ayuda con aplicacion de receta de cocina

Mensaje por Chefito »

Si te falla con las apis de regiones, prueba con la api _WinAPI_SetLayeredWindowAttributes. Puede hacer transparente un color. Mirala en la ayuda y su ejemplo.
Tienes que poner la propiedad $WS_EX_LAYERED al gui:

Código: Seleccionar todo

$GUI = GUICreate("RECIPES", 800, 500, -1,-1, $WS_POPUP, $WS_EX_LAYERED )
Ejemplo, pon el color de fondo en el gui 0xabcdef que no es muy común, y hazlo transparente:

Código: Seleccionar todo

GUISetBkColor(0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($gui, 0xABCDEF, 0, 1)
Es mucho más fácil que utilizando regiones. A ver si te va.

Respecto a los demás temas, el de poner los botones como los del programa, claro que se puede. Lo que tienes que hacer es utilizar imágenes de botones en vez de controles botones de win. Captura las imágenes de los botones, trátalas con algún programa de edición de imágenes, y cárgalas como objetos picture (GUICtrlCreatePic). Puedes capturar las imágenes de los botones cuando están pulsados y sin pulsar. Y utilizando los eventos de pulsación u algún otro método, programas que cuando se pulse, se cambie la imagen.
Tambien puedes mirar alguna udf hecha para estas cosas, como el XSkin de Valuater: http://www.autoitscript.com/forum/topic ... -your-gui/

Saludos.
Cita vista en algún lugar de la red: En este mundo hay 10 tipos de personas, los que saben binario y los que no ;).
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

dany no se que hice jaajaj , pero ahora si me esta trabajando con el transparente , bueno , se me olvido decirte que esta pc que estoy escribiendo es la de trabajo , pero es windows 7 , aqui hago las pruebas y luego lo llevo a la otra pc que tiene win xp sp3 , por lol menos esta trabajandome aqui ahoira , mira la foto


chefito no habia visto tu mensaje o e el mismo momento que tu posteabas , yo escribia , bueno no he provado como dices , se que la manera de dany sola trabajo , antes no , pero provare esa variante , esto cada ves se esta poniendo mas interesante y mas dificil para mi jajajajaj , mirare lo de los botones a ver si soy capas
Adjuntos
7.jpg
7.jpg (155.33 KiB) Visto 12163 veces
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

chefito , prove tu option de la transparencia , si trabaja mucho mejor , inclusible con la de dany las letras de label , se me quedaba en un cuadro blanco , con tu option , hasta los label , se hacen transparente , solo resalta el label como tal


exite algun comando para cuando la linea de letra no cabe dentro del cuadro , que se haga SCROOLL , osea que la linea pase sola de un lado a otro para uno leer toda la linea
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

acerca del teclado que deseo agregar , el commando para llamar al teclado mio es APPOSK , pero lo que no se es como escribirlo en el script para que cuando click en la linea que desee escribir se abra el teclado y escriba
Avatar de Usuario
Dany
Profesional del Autoit
Mensajes: 651
Registrado: 28 Mar 2012, 22:49

Re: ayuda con aplicacion de receta de cocina

Mensaje por Dany »

mikeeps2 escribió:acerca del teclado que deseo agregar , el commando para llamar al teclado mio es APPOSK , pero lo que no se es como escribirlo en el script para que cuando click en la linea que desee escribir se abra el teclado y escriba

ese comando donde lo metes? en cmd? o donde?


simplemente coloca la ruta con run("C:\tu_aplicacion.exe")


saludos
  • ............................................Imagen
    ......................................Imagen
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

Dany escribió:
mikeeps2 escribió:acerca del teclado que deseo agregar , el commando para llamar al teclado mio es APPOSK , pero lo que no se es como escribirlo en el script para que cuando click en la linea que desee escribir se abra el teclado y escriba

ese comando donde lo metes? en cmd? o donde?


simplemente coloca la ruta con run("C:\tu_aplicacion.exe")


saludos
dany pero el teclado no es un aplicacion , no esun .exe , es algo que viene dentro del programa roadrunner , ese es el commando que utilizan en ese programa para llamar al teclado

mire se que usan algo asi , esto lo encontre en la pagina de ellos , mp3car.com
;create SDK for COM with RR. This must be done ONLY once per script
$rr = ObjCreate("RoadRunner.SDK")

;replace COMMAND with your RR command
$rr.execute("COMMAND")

no se si me servira ami para llamar al teclado
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

amigos , en el forum del programa que yo quiero agregar este script , me dijeron esto , pero no se

Just add these line after your include lines!
Code:
if not ProcessExists("RoadRunner.exe") Then
MsgBox(16, "!Error", "Road Runner Must Be Running")
Exit
EndIf
$rr = ObjCreate("RoadRunner.SDK")

After that, you will use all RR commands:
$rr.Execute("...")
$rr.SetUserVar("MYVAR","1")

etc...
Avatar de Usuario
Dany
Profesional del Autoit
Mensajes: 651
Registrado: 28 Mar 2012, 22:49

Re: ayuda con aplicacion de receta de cocina

Mensaje por Dany »

ahi esta colocalo es para serciorarte que este el programa del que dependes.
  • ............................................Imagen
    ......................................Imagen
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

pero con esos commandos no puedo hacer que pueda usar el teclado de roadrunner , el que te puse arriba
mikeeps2
Hacker del Foro
Mensajes: 103
Registrado: 24 May 2008, 16:34

Re: ayuda con aplicacion de receta de cocina

Mensaje por mikeeps2 »

hola dany , ya logre llamar el script con el porgrama que queria , y los botones ya tambien los logre poner en el skin del programa mio , pero ahora me queda todavia el problema del teclado , ya tengo como llamarlo

asi

$rr.Execute("LOAD;OSK.SKIN||OSKTEXT;TEST")

pero el problema que tenngo es que no se como llamarlo dentro del cuadrito de cada option , isea , donde se escribe el titulo , los ingredientes y la preparacion ....poque poniendo asi

If $cmd = "CMD1" Then;command called by RR with "SENDMSG;PHONEBOOK;CMD1"
$cmd = ""
$rr.Execute("LOAD;OSK.SKIN||OSKTEXT")

claro haciendo un boton en el skin , con ese command sendmsg , el me logra abrir el teclado pero el boton no se me pone en el script , se me pone en el skin del roadrunner ,ahora , habra alguna manera de poner especie de un boton o para llamar el telcado en el script , teniendo en cuenta el commando que te puise arrba , otra cosa ,cuando abro el teclado escribo en el bien pero no se como hacer pa queme aparesca lo que escribo en los cuadritos del script

mira este es todo el script que tengo hasta ahora

Código: Seleccionar todo

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=recipes.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Include <Array.au3>

Global Const $StructDef_COPYDATA = "ptr;dword;ptr"
;Global Const $WM_COPYDATA = 0x4A
;Global Const $WM_CLOSE = 0x10
Global Const $STRUCTDEF_AU3MESSAGE = "char[255]"

$rr = ObjCreate("RoadRunner.SDK")

$GUI = GUICreate("RECIPES", 800, 500, 0 ,0, $WS_POPUP, $WS_EX_LAYERED) ;CUADRO TOTAL TAMANO CON FRAMELESS  
GUISetBkColor(0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($gui, 0xABCDEF, 0, 1) ; hacerlo trasparente
WinWait("RECIPES")
WinMove("RECIPES", "", 0, 120, 800, 405) ; encentrarlo donde uno desee

GUICtrlCreateLabel("Ingredients",220,30,90,20);Label INGREDIENTES Top section
GUICtrlSetFont(-1, 14, 400, 2, "Times New Roman")
    GUICtrlSetColor(-1, 0xffffff)
    GUISetState(@SW_SHOW)
GUICtrlCreateLabel("Instructions",220,195,90,20);Label PREPARACION Top section
GUICtrlSetFont(-1, 14, 400, 2, "Times New Roman")
    GUICtrlSetColor(-1, 0xffffff)
    GUISetState(@SW_SHOW)





;$NewRecipeButton = GUICtrlCreateButton("New Recipe", 40, 0, 125, 42, $WS_GROUP) ;TAMANO Y POSICION DEL BOTON DE NEW RECIPE
;GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ;TAMANO DE LETRA DEL BOTON DE NEW RECIPE
$RecipeListBox = GUICtrlCreateList("", 10, 0, 200, 340) ;TAMANO Y UBICACION DEL CUADRO DE LIST
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman") ;TAMANO DE LETRA DE LIST

$TitleInput = GUICtrlCreateInput("", 270, 0, 400, 30) ;TAMANO Y UBICACION CUADRO TITULO
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")



Dim $Ing[11]
Dim $Q[11]
Dim $QT[11]




$Ing[1] = GUICtrlCreateInput("", 265, 55, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[1] = GUICtrlCreateInput("", 220, 55, 40, 25)


$Ing[2] = GUICtrlCreateInput("", 265, 83, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[2] = GUICtrlCreateInput("", 220, 83, 40, 25)


$Ing[3] = GUICtrlCreateInput("", 265, 111, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[3] = GUICtrlCreateInput("", 220, 111, 40, 25)


$Ing[4] = GUICtrlCreateInput("", 265, 140, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[4] = GUICtrlCreateInput("", 220, 140, 40, 25)


$Ing[5] = GUICtrlCreateInput("", 265, 168, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[5] = GUICtrlCreateInput("", 220, 168, 40, 25)


$Ing[6] = GUICtrlCreateInput("", 500, 55, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[6] = GUICtrlCreateInput("", 455, 55, 40, 25)


$Ing[7] = GUICtrlCreateInput("", 500, 83, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[7] = GUICtrlCreateInput("", 455, 83, 40, 25)


$Ing[8] = GUICtrlCreateInput("", 500, 111, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[8] = GUICtrlCreateInput("", 455, 111, 40, 25)


$Ing[9] = GUICtrlCreateInput("", 500, 140, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[9] = GUICtrlCreateInput("", 455, 140, 40, 25)

$Ing[10] = GUICtrlCreateInput("", 500, 168, 185, 25)
GUICtrlSetFont(-1, 12, 400, 2, "Times New Roman")
$Q[10] = GUICtrlCreateInput("", 455, 168, 40, 25)


$InstructionBox = GUICtrlCreateEdit("", 220, 220, 500, 185, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) ; CUADRO DE PREPARAION
GUICtrlSetFont(-1, 13, 400, 2, "Times New Roman")

;$SaveButton = GUICtrlCreateButton("Save", 280, 460, 165, 42, $WS_GROUP) ; BOTON DE SAVE
;GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ; LETRA DEL BOTON DE SAVE
;$DiscardButton = GUICtrlCreateButton("Discard", 495, 460, 165, 42, $WS_GROUP) ; BOTON DE DISCAR
;GUICtrlSetFont(-1, 15, 800, 2, "HandelGotDL") ; LETRA DEL BOTON DE DISCAR
LoadFirstRecipe()
RecipeListBoxRefresh()
GUISetState(@SW_SHOW)

; Register Windows Messages
GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc")
GUIRegisterMsg($WM_CLOSE, "_GUIRegisterMsgProc")
Dim $cmd
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $RecipeListBox
			LoadRecipe()
;~ 		Case $NewRecipeButton
;~ 			NewRecipe()
;~ 		Case $SaveButton
;~ 			SaveRecipe()
;~ 		Case $DiscardButton
;~ 			Discard()
	EndSwitch

;~ 	If $cmd = "LOAD" Then;command called by RR with "SENDMSG;RECIPES;LOAD"
;~ 	  $cmd = ""
;~ 		LoadRecipe()
;~ 	EndIf

	If $cmd = "NEW" Then;command called by RR with "SENDMSG;RECIPES;NEW"
	  $cmd = ""
		NewRecipe()
	EndIf

	If $cmd = "SAVE" Then;command called by RR with "SENDMSG;RECIPES;SAVE"
	  $cmd = ""
		SaveRecipe()
	EndIf

	If $cmd = "DISCARD" Then;command called by RR with "SENDMSG;RECIPES;DISCARD"
	  $cmd = ""
		Discard()		
	EndIf

	;If $cmd = "UP" Then;command called by RR with "SENDMSG;RECIPES;UP"
	;  $cmd = ""
	;	Up()
	
	;EndIf

	;If $cmd = "DOWN" Then;command called by RR with "SENDMSG;RECIPES;DOWN"
	;  $cmd = ""
	;	Down()
		
		
		
	
WEnd

Func NewRecipe()
	$SaveTitleData = GUICtrlRead($TitleInput)
 	If FileExists(@ScriptDir & "\" & $SaveTitleData &  ".txt") Then
	ResetInputs()
	Else
		$ForgotSaveMsgBox = MsgBox(4, "Save?", "Before you go on, do you want to save this " & $SaveTitleData & " recipe?")
			If $ForgotSaveMsgBox = 6 then
				WriteSaveFile()
				ResetInputs()
			Else
				ResetInputs()
			EndIf
	EndIf
$rr.Execute("LOAD;OSK.SKIN||OSKTEXT;TEST")
EndFunc

Func ResetInputs()
		GUICtrlSetData($TitleInput, "")
		For $Number = 1 to 10
			GUICtrlSetData($Ing[$Number], "")
			GUICtrlSetData($Q[$Number], "")
			GUICtrlSetData($QT[$Number], "")
		Next
		GUICtrlSetData($InstructionBox, "")
EndFunc

Func SaveRecipe()
	$SaveTitleData = GUICtrlRead($TitleInput)
	If FileExists(@ScriptDir & "\S-" & $SaveTitleData &  ".txt") Then
		 $OverwriteMsgBox = MsgBox(4, "Overwrite?", "Do you want to overwrite your other " & $SaveTitleData & " recipe?")
			If $OverwriteMsgBox = 6 then
				FileDelete(@ScriptDir & "\S-" & $SaveTitleData &  ".txt")
				WriteSaveFile()
			EndIf
	Else
		WriteSaveFile()
	EndIf
EndFunc

Func WriteSaveFile()
				$SaveTitleData = GUICtrlRead($TitleInput)
				FileWrite(@ScriptDir & "\S-" & $SaveTitleData &  ".txt", $SaveTitleData & @TAB)

				For $Number = 1 to 10
				$SaveIngData = GUICtrlRead($Ing[$Number])
				FileWrite(@ScriptDir & "\S-" & $SaveTitleData &  ".txt", $SaveIngData & @TAB)
				$SaveQData = GUICtrlRead($Q[$Number])
				FileWrite(@ScriptDir & "\S-" & $SaveTitleData &  ".txt", $SaveQData & @TAB)
				$SaveQTData = GUICtrlRead($QT[$Number])
				FileWrite(@ScriptDir & "\S-" & $SaveTitleData &  ".txt", $SaveQTData & @TAB)
				Next

				$SaveInstructionData = GUICtrlRead($InstructionBox)
				FileWrite(@ScriptDir & "\S-" & $SaveTitleData &  ".txt", $SaveInstructionData)

				If FileExists(@ScriptDir & "\S-" & $SaveTitleData &  ".txt") Then
					MsgBox(0, "Success!", "Your " & $SaveTitleData & " recipe has been saved.")
					RecipeListBoxRefresh()
				EndIf
EndFunc

Func RecipeListBoxRefresh()
	GUICtrlSetData($RecipeListBox, "")
	$FileSearch = FileFindFirstFile("S-*.*")
	While 1
		$RecipeFile = FileFindNextFile($FileSearch)
			If @Error Then ExitLoop
		GUICtrlSetData($RecipeListBox, $RecipeFile & "|")
	WEnd
    FileClose($FileSearch)
EndFunc

Func LoadFirstRecipe()
	GUICtrlSetData($RecipeListBox, "")
	$FileSearch = FileFindFirstFile("S*.*")
	$RecipeFile = FileFindNextFile($FileSearch)
		If @Error Then
		MsgBox(0, "No recipes!", "You don't have any recipes yet.")
		Else
			$LoadData=FileRead(@ScriptDir & "\" & $RecipeFile )
			$LoadData = StringSplit($LoadData, @TAB)

			GUICtrlSetData($TitleInput, $LoadData[1])
			For $Number = 1 to 10
				$ArrayNumber=3 * $Number - 1
				GUICtrlSetData($Ing[$Number], $LoadData[$ArrayNumber])
				$ArrayNumber=3 * $Number
				GUICtrlSetData($Q[$Number], $LoadData[$ArrayNumber])
				$ArrayNumber=3 * $Number + 1
				GUICtrlSetData($QT[$Number], $LoadData[$ArrayNumber])
			Next
			GUICtrlSetData($InstructionBox, $LoadData[32])
		EndIf
EndFunc

Func LoadRecipe()
 	$SaveTitleData = GUICtrlRead($TitleInput)
 	If FileExists(@ScriptDir & "\S-" & $SaveTitleData &  ".txt") Then
	LoadSaveFile()
	Else
		$ForgotSaveMsgBox = MsgBox(4, "Save?", "Before you go on, do you want to save this " & $SaveTitleData & " recipe?")
			If $ForgotSaveMsgBox = 6 then
				SaveRecipe()
				LoadSaveFile()
			Else
				LoadSaveFile()
			EndIf
	EndIf
EndFunc

Func LoadSaveFile()
		$RecipePressed = GUICtrlRead($RecipeListBox)
		$LoadData=FileRead(@ScriptDir & "\" & $RecipePressed )
		$LoadData = StringSplit($LoadData, @TAB)

		GUICtrlSetData($TitleInput, $LoadData[1])
		For $Number = 1 to 10
			$ArrayNumber=3 * $Number - 1
			GUICtrlSetData($Ing[$Number], $LoadData[$ArrayNumber])
			$ArrayNumber=3 * $Number
			GUICtrlSetData($Q[$Number], $LoadData[$ArrayNumber])
			$ArrayNumber=3 * $Number + 1
			GUICtrlSetData($QT[$Number], $LoadData[$ArrayNumber])
		Next
		GUICtrlSetData($InstructionBox, $LoadData[32])
EndFunc

Func Discard()
	$SaveTitleData = GUICtrlRead($TitleInput)
	$DeleteMsgBox = MsgBox(4, "Delete?", "Are you sure you want to delete your " & $SaveTitleData & " recipe?")
		If $DeleteMsgBox = 6 Then
			ResetInputs()
			If FileExists(@ScriptDir & "\S-" & $SaveTitleData & ".txt") then FileDelete(@ScriptDir & "\S-" & $SaveTitleData & ".txt")
			RecipeListBoxRefresh()
		EndIf
EndFunc

; Message Handler
Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam)
	If $MsgID = $WM_COPYDATA Then
		; We Recived a WM_COPYDATA Message
		; $LParam = Poiter to a COPYDATA Struct
		$vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam)
		; Member No. 3 of COPYDATA Struct (PVOID lpData;) = Pointer to Costum Struct
		$vs_msg = DllStructCreate($STRUCTDEF_AU3MESSAGE, DllStructGetData($vs_cds, 3))

		$SciTECmdLen = DllStructGetData($vs_cds, 2)
		$cmd = StringLeft(DllStructGetData($vs_msg, 1), $SciTECmdLen)

		; Display what we have recived
		;MsgBox(0, "Test String", $cmd)

	ElseIf $MsgID = $WM_CLOSE Then
	; We Recived a WM_CLOSE Message
		Exit
	EndIf
EndFunc ;==>_GUIRegisterMsgProc




otra cosa , se puede en el cursor para suvir y bajar donde escribo la PREPARACION , poner ahi dos botones para suvir y bajar la escritura , no se si me entiendes , ahi en un dibujo lo desceibo mejor
Adjuntos
untitled3.JPG
untitled3.JPG (111.37 KiB) Visto 9258 veces
Responder