GordonFreeman Posted June 25, 2012 Posted June 25, 2012 In the script there inputboxes and a button to save, operate normally, but when I use the button to FileOpenDialog the save button not work. Note: The FileOpenDialog also operate normally. But bug the other functions Frabjous Installation
guinness Posted June 25, 2012 Posted June 25, 2012 Hard to tell with no code. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
GordonFreeman Posted June 25, 2012 Author Posted June 25, 2012 (edited) expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:usersmaxdesktopprojeto frabfrabconfigform.kxf $Form1_1 = GUICreate("Frabjous Installation 1.0 - Config", 578, 378, 192, 124) GUICtrlCreateGroup("", 8, 0, 217, 273) $BoxConfig1 = GUICtrlCreateCheckbox("Box 1", 16, 16, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig3 = GUICtrlCreateCheckbox("Box 3", 16, 66, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig4 = GUICtrlCreateCheckbox("Box 4", 16, 91, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig5 = GUICtrlCreateCheckbox("Box 5", 16, 116, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig2 = GUICtrlCreateCheckbox("Box 2", 16, 41, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig6 = GUICtrlCreateCheckbox("Box 6", 16, 140, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig7 = GUICtrlCreateCheckbox("Box 7", 16, 165, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig8 = GUICtrlCreateCheckbox("Box 8", 16, 190, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig9 = GUICtrlCreateCheckbox("Box 9", 16, 215, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig10 = GUICtrlCreateCheckbox("Box 10", 16, 240, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig11 = GUICtrlCreateCheckbox("Box 11", 88, 16, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig12 = GUICtrlCreateCheckbox("Box 12", 88, 41, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig13 = GUICtrlCreateCheckbox("Box 13", 88, 66, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig14 = GUICtrlCreateCheckbox("Box 14", 88, 91, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig15 = GUICtrlCreateCheckbox("Box 15", 88, 116, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig16 = GUICtrlCreateCheckbox("Box 16", 88, 140, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig17 = GUICtrlCreateCheckbox("Box 17", 88, 165, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig18 = GUICtrlCreateCheckbox("Box 18", 88, 190, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig19 = GUICtrlCreateCheckbox("Box 19", 88, 215, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig20 = GUICtrlCreateCheckbox("Box 20", 88, 240, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig21 = GUICtrlCreateCheckbox("Box 21", 160, 16, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig22 = GUICtrlCreateCheckbox("Box 22", 160, 41, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig23 = GUICtrlCreateCheckbox("Box 23", 160, 66, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig24 = GUICtrlCreateCheckbox("Box 24", 160, 91, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig25 = GUICtrlCreateCheckbox("Box 25", 160, 116, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig26 = GUICtrlCreateCheckbox("Box 26", 160, 140, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig27 = GUICtrlCreateCheckbox("Box 27", 160, 165, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig28 = GUICtrlCreateCheckbox("Box 28", 160, 190, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig29 = GUICtrlCreateCheckbox("Box 29", 160, 215, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $BoxConfig30 = GUICtrlCreateCheckbox("Box 30", 160, 240, 57, 17) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", 8, 272, 217, 97) GUICtrlCreateLabel("Diretório:", 88, 280, 64, 22) GUICtrlSetFont(-1, 11, 800, 0, "Calibri") $InputDir = GUICtrlCreateInput("", 16, 304, 201, 22) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $ButtonSalvarDir = GUICtrlCreateButton("Salvar", 16, 336, 201, 25) GUICtrlSetFont(-1, 11, 800, 0, "Calibri") GUICtrlCreateGroup("", -99, -99, 1, 1) $Group1 = GUICtrlCreateGroup("", 232, 0, 337, 369) GUICtrlCreateLabel("Nome da Box:", 240, 16, 114, 27) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") GUICtrlCreateLabel("Arquivo (EXE / MSI):", 240, 96, 163, 27) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") $InputNomeBox = GUICtrlCreateInput("", 240, 56, 321, 22) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $InputArquivo = GUICtrlCreateInput("", 240, 136, 273, 22) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $ButtonDialogArquivo = GUICtrlCreateButton("Abrir", 520, 136, 41, 25) GUICtrlSetFont(-1, 11, 800, 0, "Calibri") GUICtrlCreateLabel("Comando:", 240, 176, 83, 27) GUICtrlSetFont(-1, 14, 800, 0, "Calibri") $InputComando = GUICtrlCreateInput("", 240, 216, 321, 22) GUICtrlSetFont(-1, 9, 800, 0, "Calibri") $CheckboxAtivDesat = GUICtrlCreateCheckbox("Ativada / Desativada", 240, 256, 321, 41) GUICtrlSetFont(-1, 11, 800, 0, "Calibri") $ButtonSalvar = GUICtrlCreateButton("Salvar", 240, 320, 321, 41) GUICtrlSetFont(-1, 11, 800, 0, "Calibri") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $BoxConfigID[30] = [$BoxConfig1,$BoxConfig2,$BoxConfig3,$BoxConfig4,$BoxConfig5,$BoxConfig6,$BoxConfig7,$BoxConfig8,$BoxConfig9,$BoxConfig10,$BoxConfig11,$BoxConfig12,$BoxConfig13,$BoxConfig14,$BoxConfig15,$BoxConfig16,$BoxConfig17,$BoxConfig18,$BoxConfig19,$BoxConfig20,$BoxConfig21,$BoxConfig22,$BoxConfig23,$BoxConfig24,$BoxConfig25,$BoxConfig26,$BoxConfig27,$BoxConfig28,$BoxConfig29,$BoxConfig30] ;Preencher Dir GUICtrlSetData($InputDir, IniRead("Config.frab", "Geral", "Dir", "")) ;-->Preencher Dir While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BoxConfig1 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig1, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX1", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX1", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX1", "")) If IniRead("Config.frab", "BoxStatus", "BOX1", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX1", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig2 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig2, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX2", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX2", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX2", "")) If IniRead("Config.frab", "BoxStatus", "BOX2", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX2", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig3 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig3, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX3", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX3", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX3", "")) If IniRead("Config.frab", "BoxStatus", "BOX3", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX3", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig4 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig4, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX4", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX4", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX4", "")) If IniRead("Config.frab", "BoxStatus", "BOX4", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX4", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig5 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig5, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX5", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX5", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX5", "")) If IniRead("Config.frab", "BoxStatus", "BOX5", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX5", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig6 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig6, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX6", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX6", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX6", "")) If IniRead("Config.frab", "BoxStatus", "BOX6", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX6", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig7 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig7, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX7", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX7", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX7", "")) If IniRead("Config.frab", "BoxStatus", "BOX7", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX7", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig8 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig8, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX8", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX8", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX8", "")) If IniRead("Config.frab", "BoxStatus", "BOX8", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX8", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig9 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig9, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX9", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX9", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX9", "")) If IniRead("Config.frab", "BoxStatus", "BOX9", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX9", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig10 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig10, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX10", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX10", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX10", "")) If IniRead("Config.frab", "BoxStatus", "BOX10", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX10", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig11 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig11, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX11", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX11", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX11", "")) If IniRead("Config.frab", "BoxStatus", "BOX11", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX11", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig12 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig12, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX12", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX12", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX12", "")) If IniRead("Config.frab", "BoxStatus", "BOX12", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX12", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig13 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig13, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX13", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX13", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX13", "")) If IniRead("Config.frab", "BoxStatus", "BOX13", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX13", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig14 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig14, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX14", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX14", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX14", "")) If IniRead("Config.frab", "BoxStatus", "BOX14", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX14", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig15 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig15, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX15", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX15", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX15", "")) If IniRead("Config.frab", "BoxStatus", "BOX15", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX15", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig16 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig16, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX16", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX16", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX16", "")) If IniRead("Config.frab", "BoxStatus", "BOX16", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX16", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig17 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig17, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX17", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX17", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX17", "")) If IniRead("Config.frab", "BoxStatus", "BOX17", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX17", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig18 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig18, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX18", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX18", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX18", "")) If IniRead("Config.frab", "BoxStatus", "BOX18", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX18", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig19 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig19, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX19", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX19", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX19", "")) If IniRead("Config.frab", "BoxStatus", "BOX19", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX19", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig20 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig20, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX20", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX20", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX20", "")) If IniRead("Config.frab", "BoxStatus", "BOX20", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX20", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig21 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig21, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX21", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX21", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX21", "")) If IniRead("Config.frab", "BoxStatus", "BOX21", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX21", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig22 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig22, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX22", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX22", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX22", "")) If IniRead("Config.frab", "BoxStatus", "BOX22", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX22", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig23 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig23, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX23", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX23", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX23", "")) If IniRead("Config.frab", "BoxStatus", "BOX23", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX23", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig24 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig24, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX24", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX24", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX24", "")) If IniRead("Config.frab", "BoxStatus", "BOX24", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX24", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig25 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig25, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX25", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX25", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX25", "")) If IniRead("Config.frab", "BoxStatus", "BOX25", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX25", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig26 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig26, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX26", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX26", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX26", "")) If IniRead("Config.frab", "BoxStatus", "BOX26", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX26", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig27 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig27, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX27", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX27", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX27", "")) If IniRead("Config.frab", "BoxStatus", "BOX27", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX27", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig28 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig28, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX28", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX28", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX28", "")) If IniRead("Config.frab", "BoxStatus", "BOX28", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX28", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig29 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig29, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX29", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX29", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX29", "")) If IniRead("Config.frab", "BoxStatus", "BOX29", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX29", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $BoxConfig30 For $i = 1 to 30 GUICtrlSetState($BoxConfigID[$i - 1], $GUI_UNCHECKED) Next GUICtrlSetState($BoxConfig30, $GUI_CHECKED) GUICtrlSetData($InputNomeBox, IniRead("Config.frab", "BoxName", "BOX30", "")) GUICtrlSetData($InputArquivo, IniRead("Config.frab", "BoxSetups", "BOX30", "")) GUICtrlSetData($InputComando, IniRead("Config.frab", "BoxComandos", "BOX30", "")) If IniRead("Config.frab", "BoxStatus", "BOX30", "") = 1 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_CHECKED) ElseIf IniRead("Config.frab", "BoxStatus", "BOX30", "") = 0 Then GUICtrlSetState($CheckboxAtivDesat, $GUI_UNCHECKED) EndIf Case $ButtonSalvarDir IniWrite("Config.frab", "Geral", "Dir", GUICtrlRead($InputDir)) Case $ButtonDialogArquivo $FileOpenDialog = FileOpenDialog("Selecione o Arquivo:", @WorkingDir, "Executavel (*.exe)|MSI (*.msi)") GUICtrlSetData($InputArquivo, $FileOpenDialog) Case $ButtonSalvar For $i = 1 to 30 If GUICtrlRead(Execute("$BoxConfig" & $i)) = 1 Then IniWrite("Config.frab", "BoxName", "BOX" & $i, GUICtrlRead($InputNomeBox)) IniWrite("Config.frab", "BoxSetups", "BOX" & $i, GUICtrlRead($InputArquivo)) IniWrite("Config.frab", "BoxComandos", "BOX" & $i, GUICtrlRead($InputComando)) If GUICtrlRead($CheckboxAtivDesat) = 1 Then IniWrite("Config.frab", "BoxStatus", "BOX" & $i, "1") Else IniWrite("Config.frab", "BoxStatus", "BOX" & $i, "0") EndIf EndIf Next EndSwitch WEnd Edited June 25, 2012 by GordonFreeman Frabjous Installation
GordonFreeman Posted June 25, 2012 Author Posted June 25, 2012 (edited) Do not understand. FileOpenDialog causes a crazy bug EDIT! Lol. When I compile the bug does not occur more EDIT!2 back occur. I'll have to remake the script -- Edited June 25, 2012 by GordonFreeman Frabjous Installation
somdcomputerguy Posted June 25, 2012 Posted June 25, 2012 When the FileOpenDialog is open, it has focus and the GUI does not anymore have focus. This isn't really a bug, most Windows apps act the same way, and I believe they're supposed to act that way. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
GordonFreeman Posted June 25, 2012 Author Posted June 25, 2012 But now. What do I do? Frabjous Installation
somdcomputerguy Posted June 26, 2012 Posted June 26, 2012 Perhaps something in this thread will help - - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
AdmiralAlkex Posted June 26, 2012 Posted June 26, 2012 The save works, but you are saving to the folder choosen by FileOpenDialog due to using relative paths ("Config.frab")....If you open the helpfile and go to FileOpenDialog():@WorkingDir is changed on successful return.Either change the current dir back afterwards with FileChangeDir() or use full paths, like @ScriptDir & "\Config.frab" if you want to change to the scripts folder.Also I recommend you learn some arrays (Array Tutorial), your script would be almost 30 times shorter if you looped through $BoxConfig the same way you do $BoxConfigID. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
GordonFreeman Posted June 28, 2012 Author Posted June 28, 2012 Case $ButtonDialogArquivo $Dir = @WorkingDir $FileOpenDialog = FileOpenDialog("Selecione o Arquivo:", @ScriptDir, "Executavel (*.exe)|MSI (*.msi)") GUICtrlSetData($InputArquivo, $FileOpenDialog) FileChangeDir($Dir)Ok now I understandAdmiralAlkexCould you give me an example to decrease the script. Or logic. I not imagine how to do without the "case".I am entirely grateful for your help. Sorry for my bad English, which is not my native language. Frabjous Installation
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now