Nostromo Posted March 7, 2007 Share Posted March 7, 2007 I have a winXP sp2 machine that will not run autoit scripts, when they are executed the script just hangs after a few commands and eats up 90+% of the CPU time. The machine is only a few months old and would run the same scripts previously, the scripts themselves are fine as they run problem free on many other machines. The antivirus software is upto date and not detecting any viruses. Has anyone had a similar problem or have any ideas what might be causing the problem? Link to comment Share on other sites More sharing options...
lod3n Posted March 7, 2007 Share Posted March 7, 2007 There's a bug on line 17. Probably. Or maybe not. Hmm, I just can't figure it out. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Shevilie Posted March 7, 2007 Share Posted March 7, 2007 I get the CPU load for the non sleep while loop at line 41 Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Nostromo Posted March 8, 2007 Author Share Posted March 8, 2007 As I said in the first post the problem is not in the coding of the script itself as the same scripts run fine on every other computer i have tried them on and that is more than 50 of them, and they also previously worked on this machine. They are compiled, so what is it that executes the exes, maybe the is a problem there what would i need to reinstall to repair that? Link to comment Share on other sites More sharing options...
Nostromo Posted March 12, 2007 Author Share Posted March 12, 2007 expandcollapse popupFileDelete ( "c:\Installed.txt" ) ; Smartboard Software 9 If FileExists("C:\Program Files\SMART Board Software\SMARTBoardTools.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Smartboard Software 9 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Smartboard Software 9 Not Installed" ) EndIf ; Testbase KS1 English $filename = "C:\Program Files\Testbase32\K1_ENG.LOG" If FileExists($filename) = 1 Then $file = FileOpen ( $filename, 0 ) Do $line = FileReadLine ($file) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1) FileWriteLine ( "c:\Installed.txt", "Testbase KS1 English Issue " & $line & " Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Testbase KS1 English Not Installed" ) EndIf ; Testbase KS1 Maths $filename = "C:\Program Files\Testbase32\K1_MATHS.LOG" If FileExists($filename) = 1 Then $file = FileOpen ( $filename, 0 ) Do $line = FileReadLine ($file) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1) FileWriteLine ( "c:\Installed.txt", "Testbase KS1 Maths Issue " & $line & " Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Testbase KS1 Maths Not Installed" ) EndIf ; Testbase KS2 English $filename = "C:\Program Files\Testbase32\K2_ENG.LOG" If FileExists($filename) = 1 Then $file = FileOpen ( $filename, 0 ) Do $line = FileReadLine ($file) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1) FileWriteLine ( "c:\Installed.txt", "Testbase KS2 English Issue " & $line & " Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Testbase KS2 English Not Installed" ) EndIf ; Testbase KS2 Maths $filename = "C:\Program Files\Testbase32\K2_MATHS.LOG" If FileExists($filename) = 1 Then $file = FileOpen ( $filename, 0 ) Do $line = FileReadLine ($file) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1) FileWriteLine ( "c:\Installed.txt", "Testbase KS2 Maths Issue " & $line & " Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Testbase KS2 Maths Not Installed" ) EndIf ; Testbase KS2 Science $filename = "C:\Program Files\Testbase32\K2_SCI.LOG" If FileExists($filename) = 1 Then $file = FileOpen ( $filename, 0 ) Do $line = FileReadLine ($file) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1) FileWriteLine ( "c:\Installed.txt", "Testbase KS2 Science Issue " & $line & " Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Testbase KS2 Science Not Installed" ) EndIf ; Acrobat Reader 6 If FileExists("C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Acrobat Reader 6 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Acrobat Reader 6 Not Installed" ) EndIf ; QuickTime If FileExists("C:\Program Files\QuickTime\QuickTimePlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "QuickTime Installed" ) Else FileWriteLine ( "c:\Installed.txt", "QuickTime Not Installed" ) EndIf ; Maths Pack 1 If FileExists("C:\Program Files\Maths Pack 1\cdfiles\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Maths Pack 1 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Maths Pack 1 Not Installed" ) EndIf ; Maths Pack 2 If FileExists("C:\Program Files\Maths Pack 2\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Maths Pack 2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Maths Pack 2 Not Installed" ) EndIf ; Primary Games 1 If FileExists("C:\Program Files\Primary Games Vol.1\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Primary Games 1 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Primary Games 1 Not Installed" ) EndIf ; Primary Games 2 If FileExists("C:\Program Files\Primary Games Vol.2\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Primary Games 2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Primary Games 2 Not Installed" ) EndIf ; Primary Games 3 If FileExists("C:\Program Files\Primary Games Vol.3\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Primary Games 3 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Primary Games 3 Not Installed" ) EndIf ; Teaching Tables If FileExists("C:\Program Files\Teaching Tables\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Teaching Tables Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Teaching Tables Not Installed" ) EndIf ; Teaching Time If FileExists("C:\Program Files\Teaching Time\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Teaching Time Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Teaching Time Not Installed" ) EndIf ; Teaching Money If FileExists("C:\Program Files\Teaching Money\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Teaching Money Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Teaching Money Not Installed" ) EndIf ; Teaching Measures If FileExists("C:\Program Files\Teaching Measures\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Teaching Measures Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Teaching Measures Not Installed" ) EndIf ; Granada Branch If FileExists("C:\Toolkit\Granada Branch\Granada Branch.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Granada Branch Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Granada Branch Not Installed" ) EndIf ; BlackCat Compose If FileExists("C:\Program Files\BlackCat\Compose\bcCompose.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "BlackCat Compose Installed" ) Else FileWriteLine ( "c:\Installed.txt", "BlackCat Compose Not Installed" ) EndIf ; Information Workshop 2000 If FileExists("C:\Program Files\BlackCat\Information Workshop 2000\iw2.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Information Workshop 2000 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Information Workshop 2000 Not Installed" ) EndIf ; Adobe Reader 6.0 If FileExists("C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Adobe Reader 6.0 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Adobe Reader 6.0 Not Installed" ) EndIf ; QuickTimePlayer If FileExists("C:\Program Files\QuickTime\QuickTimePlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "QuickTimePlayer Installed" ) Else FileWriteLine ( "c:\Installed.txt", "QuickTimePlayer Not Installed" ) EndIf ; Virtual Experiments Yr 3 and 4 If FileExists("C:\Program Files\Virtual_Experiments_Yr3&4\Virtual Experiments Yr 3 and 4.exe") = 1 Or FileExists("C:\Program Files\Collins\Virtual_Experiments_Yr3&4\Virtual Experiments Yr 3 and 4.exe") Then FileWriteLine ( "c:\Installed.txt", "Virtual Experiments Yr 3 and 4 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Virtual Experiments Yr 3 and 4 Not Installed" ) EndIf ; Virtual Experiments Yr 5 and 6 If FileExists("C:\Program Files\Virtual Experiments Yr 5 and 6\Virtual Experiments Yr 5 and 6.exe") = 1 Or FileExists("C:\Program Files\Collins\Virtual Experiments Yr 5 and 6\Virtual Experiments Yr 5 and 6.exe") Then FileWriteLine ( "c:\Installed.txt", "Virtual Experiments Yr 5 and 6 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Virtual Experiments Yr 5 and 6 Not Installed" ) EndIf ; Dazzle 03 ;If FileExists("C:\Program Files\Indigo Learning\Dazzle03\Dazzle03.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Dazzle 03 Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Dazzle 03 Not Installed" ) ;EndIf ; Pelican Big Books 5A ;If FileExists("C:\Program Files\Pelican Interactive Big Books\Year 5 Volume A\Start.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Pelican Big Books 5A Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Pelican Big Books 5A Not Installed" ) ;EndIf ; Pelican Big Books 5B ;If FileExists("C:\Program Files\Pelican Interactive Big Books\Year 5 Volume B\Start.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Pelican Big Books 5B Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Pelican Big Books 5B Not Installed" ) ;EndIf ; Robolab ;If FileExists("C:\Program Files\Robolab\Engine\ROBOLAB2.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Robolab 2.5.1 Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Robolab 2.5.1 Not Installed" ) ;EndIf ; Control It 2 ;If FileExists("C:\Program Files\Deltronics\ControlIt2\ControlIt2.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Control It 2 Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Control It 2 Not Installed" ) ;EndIf ; Designer If FileExists("C:\Program Files\BlackCat\Designer\Designer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Designer Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Designer Not Installed" ) EndIf ; Places of Worship: Christianity ;If FileExists("C:\Program Files\Birchfield\PlacesChristianityKS2\ChristianityKS2.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Places of Worship: Christianity Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Places of Worship: Christianity Not Installed" ) ;EndIf ; Places of Worship: Islam ;If FileExists("C:\Program Files\Birchfield\PlacesIslamKS2\IslamKS2.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Places of Worship: Islam Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Places of Worship: Islam Not Installed" ) ;EndIf ; Places of Worship: Judaism ;If FileExists("C:\Program Files\Birchfield\PlacesJudaismKS2\JudaismKS2.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Places of Worship: Judaism Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Places of Worship: Judaism Not Installed" ) ;EndIf ; Science Explorer II ;If FileExists("C:\Program Files\SCEX2\SX2.exe") = 1 Then ; FileWriteLine ( "c:\Installed.txt", "Science Explorer II Installed" ) ;Else ; FileWriteLine ( "c:\Installed.txt", "Science Explorer II Not Installed" ) ;EndIf ; ICT for Primary Maths - Year 1 If FileExists("C:\Program Files\ICT for Primary Maths - Year 1\Hyperstudio Files\HSPlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 1 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 1 Not Installed" ) EndIf ; ICT for Primary Maths - Year 2 If FileExists("C:\Program Files\ICT for Primary Maths - Year 2\Hyperstudio Files\HSPlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 2 Not Installed" ) EndIf ; ICT for Primary Maths - Year 3 If FileExists("C:\Program Files\ICT for Primary Maths - Year 3\Hyperstudio Files\HSPlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 3 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 3 Not Installed" ) EndIf ; ICT for Primary Maths - Year 4 If FileExists("C:\Program Files\ICT for Primary Maths - Year 4\Hyperstudio Files\HSPlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 4 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 4 Not Installed" ) EndIf ; ICT for Primary Maths - Year 5 If FileExists("C:\Program Files\ICT for Primary Maths - Year 5\Hyperstudio Files\HSPlayer.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 5 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "ICT for Primary Maths - Year 5 Not Installed" ) EndIf ; Blackcat Logo If FileExists("C:\Program Files\BlackCat\Logo\Logo.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Blackcat Logo Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Blackcat Logo Not Installed" ) EndIf ; Flowol 2 If FileExists("C:\Program Files\Keep I.T. Easy\Flowol 2\Flowol2.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Flowol 2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Flowol 2 Not Installed" ) EndIf ; Revelation Natural Art If FileExists("C:\Program Files\Revelation Natural Art\NaturalArt.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Revelation Natural Art Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Revelation Natural Art Not Installed" ) EndIf ; Control Station 2 If FileExists("C:\Program Files\Economatics\Control Station 2004\ControlStation.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Control Station 2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Control Station 2 Not Installed" ) EndIf ; Word If FileExists("C:\Program Files\Microsoft Office\OFFICE11\winword.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Microsoft Word Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Microsoft Word Not Installed" ) EndIf ; Excel If FileExists("C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE") = 1 Then FileWriteLine ( "c:\Installed.txt", "Microsoft Excel Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Microsoft Excel Not Installed" ) EndIf ; Access If FileExists("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE") = 1 Then FileWriteLine ( "c:\Installed.txt", "Microsoft Access Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Microsoft Access Not Installed" ) EndIf ; Publisher If FileExists("C:\Program Files\Microsoft Office\OFFICE11\MSPUB.EXE") = 1 Then FileWriteLine ( "c:\Installed.txt", "Microsoft Publisher Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Microsoft Publisher Not Installed" ) EndIf ; PowerPoint If FileExists("C:\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE") = 1 Then FileWriteLine ( "c:\Installed.txt", "Microsoft PowerPoint Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Microsoft PowerPoint Not Installed" ) EndIf ; InfoPath If FileExists("C:\Program Files\Microsoft Office\OFFICE11\INFOPATH.EXE") = 1 Then FileWriteLine ( "c:\Installed.txt", "Microsoft InfoPath Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Microsoft InfoPath Not Installed" ) EndIf ; MathSphere Six in One If FileExists("C:\Program Files\MathSphere\MathSphere Six in One\congrats.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "MathSphere Six in One Installed" ) Else FileWriteLine ( "c:\Installed.txt", "MathSphere Six in One Not Installed" ) EndIf ; eQuest 1 If FileExists("C:\Program Files\eQuest\eQuest_disc1\eQuest_disc1.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "eQuest 1 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "eQuest 1 Not Installed" ) EndIf ; eQuest 2 If FileExists("C:\Program Files\eQuest\eQuest_disc2\eQuest_disc2.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "eQuest 2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "eQuest 2 Not Installed" ) EndIf ; eQuest 3 If FileExists("C:\Program Files\eQuest\eQuest_disc3\eQuest_disc3.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "eQuest 3 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "eQuest 3 Not Installed" ) EndIf ; eQuest 4 If FileExists("C:\Program Files\eQuest\eQuest_disc4\eQuest_disc4.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "eQuest 4 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "eQuest 4 Not Installed" ) EndIf ; Lighthouse Disc 3 If FileExists("C:\Program Files\Ginn\Lighthouse Disc 3\Lighthouse Disc 3.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Lighthouse Disc 3 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Lighthouse Disc 3 Not Installed" ) EndIf ; LCP Science Assessment Y1 If FileExists("C:\Program Files\LCP Assessment Activities\Documents\Y1 answers.doc") = 1 Then FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y1 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y1 Not Installed" ) EndIf ; LCP Science Assessment Y2 If FileExists("C:\Program Files\LCP Assessment Activities\Documents\Y2 answers.doc") = 1 Then FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y2 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y2 Not Installed" ) EndIf ; LCP Science Assessment Y3 If FileExists("C:\Program Files\LCP Assessment Activities\Documents\Science\Y3 answers.doc") = 1 Then FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y3 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y3 Not Installed" ) EndIf ; LCP Science Assessment Y4 If FileExists("C:\Program Files\LCP Assessment Activities\Documents\Science\Y4 answers.doc") = 1 Then FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y4 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y4 Not Installed" ) EndIf ; LCP Science Assessment Y5 If FileExists("C:\Program Files\LCP Assessment Activities\Documents\Science\Y5 answers.doc") = 1 Then FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y5 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y5 Not Installed" ) EndIf ; LCP Science Assessment Y6 If FileExists("C:\Program Files\LCP Assessment Activities\Documents\Science\Y6 answers.doc") = 1 Then FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y6 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "LCP Science Assessment Y6 Not Installed" ) EndIf ; Clicker 5 If FileExists("C:\Program Files\Crick Software\Clicker 5\Clicker 5.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "Clicker 5 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "Clicker 5 Not Installed" ) EndIf ; MathSphere Its All Figured Out v4 If FileExists("C:\Program Files\MathSphere\MathSphere Its All Figured Out v4\menu.exe") = 1 Then FileWriteLine ( "c:\Installed.txt", "MathSphere AFO4 Installed" ) Else FileWriteLine ( "c:\Installed.txt", "MathSphere AFO4 Not Installed" ) EndIf FileCopy ( "c:\Installed.txt", "\\svr-1\netinst\Install\" & @ComputerName & ".txt" , 1 ) Run ("Notepad.exe c:\Installed.txt") ; Finished! Link to comment Share on other sites More sharing options...
Nostromo Posted March 12, 2007 Author Share Posted March 12, 2007 (edited) expandcollapse popupIf FileExists("C:\Program Files\Crick Software\Clicker 5\Clicker 5.exe") = 0 Then Run("X:\Clicker 5 cd\setup.exe","X:\Clicker 5 cd\") Do MsgBox(4096, "Activating Window:", "Clicker 5 Installer", 1) Winactivate("Clicker 5 Installer") Until WinActive("Clicker 5 Installer") MsgBox(4096, "Window:", "Activated!", 2) Sleep(1000) ControlClick("Clicker 5 Installer","","Button1") Sleep(2000) WinWaitActive("Clicker 5 English UK Standalone Setup") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button1") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button3") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button4") Sleep(1000) Send("School") Send("{TAB}") Send("code") Send("{TAB}") Send("code") ControlClick("Clicker 5 English UK Standalone Setup","","Button2") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button5") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button1") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button1") Sleep(10000) WinWaitActive("Clicker 5 English UK Standalone Setup","&Finish") Sleep(1000) ControlClick("Clicker 5 English UK Standalone Setup","","Button1") EndIF ; Finished! Edited March 12, 2007 by Nostromo Link to comment Share on other sites More sharing options...
Nostromo Posted March 12, 2007 Author Share Posted March 12, 2007 (edited) expandcollapse popup$filename = "C:\Program Files\Testbase32\K1_ENG.LOG" If FileExists($filename) Then $file = FileOpen ( $filename, 0 ) Do $line = FileReadLine ($file) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1) If $line >7 Then Exit EndIf EndIf Run("K1_ENG_Setup") WinWaitActive("Testbase Installation","Welcome!") Sleep(2000) Send("{ENTER}") Sleep(1000) Send("{RIGHT}{Enter}") Sleep(1000) Send("School") Send("{TAB}") Send("code") Send("{TAB}") Send("{TAB}") Send("code") Send("{ENTER}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ENTER}") WinWaitActive("Testbase Installation","&Finish") Send("{ENTER}") ; Finished! Edited March 12, 2007 by Nostromo Link to comment Share on other sites More sharing options...
Nostromo Posted March 12, 2007 Author Share Posted March 12, 2007 Ok there are 3 sample scripts They all run on every other computer i have tried, but not on this one machine. They will not run if compiled as an exe or even if i run autoit on tha machine and run the script that way, i even installed autoit on the problem machine to test out if that made a difference, it didn't. The first script should create a txt file with 20 odd lines stating installed or not installed for software titles, on the problem machine it manages to write the first line only. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 12, 2007 Moderators Share Posted March 12, 2007 The only consistency I see in the posts in relationship to each other, reading it here in the thread, is the hard drive is hard coded. The "new" machine I am going to assume is also to interacted with on the "c:\" drive? What AV software are you running (If any), and what AutoIt version are you using? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Nostromo Posted March 12, 2007 Author Share Posted March 12, 2007 (edited) Scratch that the 2nd script does run. Had tried several scripts and everyone failed, that wasn't one of them just tried that and it works. The scripts were compiled with several versions, but i just downloaded the latest on the problem machine installed it there and have run the scripts on it and the 1st and 3rd still fail. The only thing i can think is its something to do with the variables, it seems the scripts that fail are the ones trying to read in from files. The AV software is Sophos and its the new v6 upto date, the other machines are running the same. Edited March 12, 2007 by Nostromo Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 12, 2007 Moderators Share Posted March 12, 2007 (edited) I only really looked at the last one... if you run this like I have it in SciTe (not compiled)... do you see anything that will help you fix your issue? Also, I made just a few comments on what I see in the code itself:CODEexpandcollapse popupOpt('RunErrorsFatal', 0) $bDebug = True $filename = "C:\Program Files\Testbase32\K1_ENG.LOG" If FileExists($filename) Then $file = FileOpen ( $filename, 0) If $file <> -1 Then Do $line = FileReadLine($file) ;Are we stuck in the loop? If $bDebug Then ConsoleWrite(@LF & 'Line Read = ' & $line & @LF) Until $line = "INI Item: IssueNumber" $line = FileRead ($file, 9) $line = FileRead ($file, 1);This one over writes the one stored above, why do we have the one above it? ;Is $line always greater than 7? Also, we are reading the file as a string, yet checking against an integer If $bDebug Then ConsoleWrite(@LF & '$line Value = ' & $line) If Int($line) >7 Then;Added Int Exit EndIf Else MsgBox(16, 'Error', 'Error opening file to be read.' & @CRLF & 'Line = ' & @ScriptLineNumber) EndIf Else MsgBox(16, 'Error', 'File does not exist.' & @CRLF & 'Line = ' & @ScriptLineNumber) Exit EndIf If FileExists("K1_ENG_Setup") Then Run("K1_ENG_Setup");What are you running here? If @error Then MsgBox(16, 'Error', 'File could not be ran.' & @CRLF & 'Line = ' & @ScriptLineNumber) Exit EndIf Else MsgBox(16, 'Error', 'File does not exist.' & @CRLF & 'Line = ' & @ScriptLineNumber) Exit EndIf WinWaitActive("Testbase Installation","Welcome!") Sleep(2000) Send("{ENTER}") Sleep(1000) Send("{RIGHT}{Enter}") Sleep(1000) Send("School") Send("{TAB}") Send("code") Send("{TAB}") Send("{TAB}") Send("code") Send("{ENTER}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ENTER}") Sleep(1000) Send("{ENTER}") WinWaitActive("Testbase Installation","&Finish") Send("{ENTER}") ; Finished! Edit: Added codebox tags Edit2: I was checking for a Run error and forgot to add Opt('RunErrorsFatal', 0) Edited March 12, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Nostromo Posted March 12, 2007 Author Share Posted March 12, 2007 It was stuck in a loop, found the problem the log files were messed up. I wrote that script quite a long time ago, not sure why that extra read line is in there unless it was to move past an entry in the log file i didn't want read. Thank you for all your help, i know i'm a coding noowbie Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 12, 2007 Moderators Share Posted March 12, 2007 It was stuck in a loop, found the problem the log files were messed up.I wrote that script quite a long time ago, not sure why that extra read line is in there unless it was to move past an entry in the log file i didn't want read.Thank you for all your help, i know i'm a coding noowbie Well I see 3 things that came from this post for you.1. You know now, when you have an issue, that posting the code that is giving you an issue will get your problem resolved much faster.2. You know now that it can in fact be the coders fault.3. You found your issue and now you can be on your merry way with fixing it.Good Job, and Good Luck. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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