delstone123 Posted March 1, 2014 Posted March 1, 2014 Hi, I have created a simple gui which when I run it on XP (f5 from scite or compiled-ctrl-f7) I cannot see the gui. I seems to work fine on my windows 7 machine. All I see is an autoit box on the status bar with the application file name - it won't maximise when I click on it and I can exit it via the usual right click and close. Has anyone come across this strange problem before?
guinness Posted March 1, 2014 Posted March 1, 2014 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
guinness Posted March 1, 2014 Posted March 1, 2014 The code isn't runnable and I'm not in the mood to start working out includes for the sake of helping out. Help me before I help you please. 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
delstone123 Posted March 1, 2014 Author Posted March 1, 2014 (edited) Apologies - here's the headers included expandcollapse popup; *** Start added by AutoIt3Wrapper *** #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; *** End added by AutoIt3Wrapper *** #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=..\..\..\Work\Verifier Edition.exe #AutoIt3Wrapper_Outfile_x64=..\..\..\Work\Verifier Edition.exe #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Debug_Mode #include <IE.au3> #include <GUIConstants.au3> #include <GuiEdit.au3> #include <File.au3> #include <Array.au3> #include <GuiListView.au3> GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Global $PauseWork = False, $StopWork = False Global $outputfile, $outputfile_invalid, $inputfile, $linesinfile Global $PauseButton, $StopButton, $BrowseBtn1, $BrowseBtn2, $StartBox, $ProcessesBox, $ProcessEverythingBox Global $outputfilename = "output.csv", $outputfilename_invalid, $inputfilename = "test input.csv" $Form = GUICreate("Validator", 370, 450, 930, 120) GUISetBkColor(0xA6CAF0) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseClicked") ;Site GUICtrlCreateLabel("Site for test", 20, 15, 150, 24) $Combo1 = GUICtrlCreateCombo("", 140, 15, 120, 25) GUICtrlSetData(-1, 'Site 1|Site 2|Site 3|Site 4') ;Input File GUICtrlCreateLabel("Input file destination", 20, 55, 170, 24) $input_filename = GUICtrlCreateInput(@DesktopDir & '\' & $inputfilename, 20, 83, 230, 21, BitOR($ES_AUTOHSCROLL, $ES_READONLY)) $BrowseBtn1 = GUICtrlCreateButton("Browse", 270, 78, 80, 25, -1) ; Output File GUICtrlCreateLabel("Output file destination", 20, 125, 170, 24) $output_filename = GUICtrlCreateInput(@DesktopDir & '\' & $outputfilename, 20, 155, 230, 21, BitOR($ES_AUTOHSCROLL, $ES_READONLY)) $BrowseBtn2 = GUICtrlCreateButton("Browse", 270, 153, 80, 25, -1) ;Increments / Processes GUICtrlCreateLabel("Start At Line:", 20, 190, 100, 24) $StartBox = GUICtrlCreateInput("1", 140, 190, 30, 21) GUICtrlCreateLabel("Processes:", 200, 190, 100, 24) $ProcessesBox = GUICtrlCreateInput("1", 310, 190, 30, 21) $ProcessEverythingBox = GUICtrlCreateCheckbox("Process everything", 20, 220, 150, 21) GUICtrlSetState(-1, $GUI_CHECKED) ;Reporting GUICtrlCreateLabel("REPORTING:", 20, 255, 100, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("Last record:", 20, 280, 100, 24) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") $Label11 = GUICtrlCreateLabel("0", 160, 280, 190, 24) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("Progress:", 20, 305, 100, 24) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") $Label13 = GUICtrlCreateLabel("0", 160, 305, 190, 24) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("Validated numbers:", 20, 335, 150, 24) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") $Label15 = GUICtrlCreateLabel("0", 160, 335, 190, 24) GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif") ;Start activity buttons $ValidateButton = GUICtrlCreateButton("&Validate", 10, 395, 100, 30, 0) GUICtrlSetState(-1, 512) $CreateButton = GUICtrlCreateButton("Create &New", 125, 395, 100, 30, 0) $PauseButton = GUICtrlCreateButton("&Pause", 240, 395, 50, 30, 0) $StopButton = GUICtrlCreateButton("&Stop", 305, 395, 50, 30, 0) GUICtrlSetState($PauseButton, $GUI_DISABLE) GUICtrlSetState($StopButton, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BrowseBtn1 ; input file $if = FileSaveDialog('Input file destination', @DesktopDir, "All files (*.*)") If $if <> "" Then GUICtrlSetData($input_filename, $if) Case $BrowseBtn2 ; output file $of = FileSaveDialog('Output file destination', @DesktopDir, "All files (*.*)") If $of <> "" Then GUICtrlSetData($output_filename, $of) Case $ValidateButton ; Check $linesinfile = _FileCountLines(GUICtrlRead($input_filename)) $inputfile = FileOpen(GUICtrlRead($input_filename), 0) If ($inputfile == -1) Then MsgBox(0, "Error", "Input file input.csv doesn't exist on desktop or can't be read" & @CRLF & "Please check and retry") Else If CreateOutputFile($outputfile, GUICtrlRead($output_filename)) Then GUICtrlSetState($CreateButton, $GUI_DISABLE) GUICtrlSetState($ValidateButton, $GUI_DISABLE) GUICtrlSetState($BrowseBtn1, $GUI_DISABLE) GUICtrlSetState($BrowseBtn2, $GUI_DISABLE) GUICtrlSetState($PauseButton, $GUI_ENABLE) GUICtrlSetState($StopButton, $GUI_ENABLE) Verify() FileClose($outputfile) FileClose($outputfile_invalid) FileClose($inputfile) GUICtrlSetState($CreateButton, $GUI_ENABLE) GUICtrlSetState($ValidateButton, $GUI_ENABLE) GUICtrlSetState($BrowseBtn1, $GUI_ENABLE) GUICtrlSetState($BrowseBtn2, $GUI_ENABLE) GUICtrlSetState($PauseButton, $GUI_DISABLE) GUICtrlSetState($StopButton, $GUI_DISABLE) EndIf EndIf EndSwitch WEnd ... Edited March 1, 2014 by delstone123
jguinch Posted March 1, 2014 Posted March 1, 2014 Works fine on both Windows XP and Windows 7. In your code, GUICreate parameter for left position is set to 930. Maybe your screen resolution is 800x600, so your GUI is out of the screen... no ? Try with -1 instead of 930. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
delstone123 Posted March 2, 2014 Author Posted March 2, 2014 Fantastic jguinch - that's solved it! I've pulled my hair out all day over this problem. So simple a solution. Thank you!
guinness Posted March 2, 2014 Posted March 2, 2014 jguinch,I have no idea how you ran that code. Good for you anyway. 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
jguinch Posted March 2, 2014 Posted March 2, 2014 Sure, guinness, the code is not useable directly. I ran it from a double-click instead of launching if not from scite Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
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