Chimaera Posted May 24, 2013 Share Posted May 24, 2013 I have a gui that copies a file to a folder after some files are moved around into other folders when the first gui exits its supposed to start the second file but it doesnt do it I started with these 2 but neither seem to work for me here is my while loop Local $nMsg = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button1 $sSetDefault = _FindDefault() $sNewProgPath = $sSetDefault & "\Uploader.exe" ;<<<<<<<<<<<<<<<<< ConsoleWrite($sSetDefault & @CRLF) Local $FindArch = _RecFileListToArray($sSetDefault, "*.rar;*.zip;*.0??;*.par?|*.iso;*.bin|" & $sSetDefault & "\Upload", 1, 1) ;~ _ArrayDisplay($FindArch, "Archive Files") If IsArray($FindArch) Then _RarParMove() Sleep(100) FileMove(@TempDir & "\Sup\Uploader.exe", $sSetDefault & "\Uploader.exe", 9) Exit ;~ If Not ProcessExists("Simple Packer.exe") Then ;~ Run($sSetDefault & "\Uploader.exe") ;~ Exit ;~ EndIf Else FileMove(@TempDir & "\Sup\Uploader.exe", $sSetDefault & "\Uploader.exe", 9) Exit ;~ If Not ProcessExists("Simple Packer.exe") Then ;~ Run($sSetDefault & "\Uploader.exe") ;~ Exit ;~ EndIf EndIf EndSwitch WEnd Ive commented out the while loops Is it not working because the file only copies just before it? I tried adding the while to the main while wend and it just locks up the GUI and the other part i tried was this with the commeneted line at top of while loop Global $sTargetProcess = "Simple Packer.exe" Global $sNewProcess = "Uploader.exe" AdlibRegister("_Launcher", 100) Func _Launcher() If Not ProcessExists($sTargetProcess) Then Run($sNewProgPath) EndIf EndFunc any thoughts to point me in the right direction please If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
kylomas Posted May 24, 2013 Share Posted May 24, 2013 Chimaera, Can you explain in more detail what you mean by this? when the first gui exits its supposed to start the second file but it doesnt do it Specifically, what is "first gui" and what is "second file". kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Chimaera Posted May 25, 2013 Author Share Posted May 25, 2013 basically i have a start gui which finds the folder checks for certain conditions and moves files based on those conditions then adds the second file (gui) into the folder then number 1 gui needs to exit and number 2 gui needs to start, this is the one that does the real work manipulating the files etc Number 2 is FileInstalled inside number one so it adds it at the appropriate point i.e. FileMove(@TempDir & "\Sup\Uploader.exe", $sSetDefault & "\Uploader.exe", 9) then gui 1 needs to exit and gui 2 (uploader.exe) needs to start except gui 2 wont start with what i have tried above, it moves to the folder but never starts Im assuming im doing it wrong somewhere but i cant figure out where If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
guinness Posted May 25, 2013 Share Posted May 25, 2013 ProcessClose shouldn't be used if there are other means i.e. using WinClose by detecting a window handle from the PID. Also could you create a GIF image animation of what you're trying to do (GifCam is free and Portable) because file and GUI are two different things. 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 Link to comment Share on other sites More sharing options...
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