NTKBO Posted June 13, 2006 Share Posted June 13, 2006 I have a script which shuts down the system after a DOS program runs. It saves the console output to a text file (in 'My Documents') and puts a link in the start up directory to display this text file on re-boot. This script is intended to be run in compiled format only, and I know it must be something I am screwing up, but when the system re-starts, it launches the Au3 script instead of the compiled file. (They are entirely seperate drives) [The link should call the compiled script with a param so that the script will then delete the link and display the text.] Any help would be greatly appreciated! While ProcessExists($Pid) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE If GUICtrlRead($DispLog) = 1 Then ; Create shortcut to Log file FileCreateShortcut(@AutoItExe, @StartupDir & "\ShowLog.lnk", "C:\", "ShowLog", "Show RarSlave Output Log") EndIf If GUICtrlRead($HTML) = 1 Then ; Create shortcut to HTML Log file FileCreateShortcut(@AutoItExe, @StartupDir & "\ShowHTML.lnk", "C:\", "ShowHTML", "Show RarSlave HTML Log") EndIf Exit Case Else ;;; EndSelect WEnd Link to comment Share on other sites More sharing options...
JSThePatriot Posted June 13, 2006 Share Posted June 13, 2006 I generally dont use @AutoItEXE. I would use if possible @ScriptDir or @ScriptFullPath. Try those to see if it works. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
NTKBO Posted June 13, 2006 Author Share Posted June 13, 2006 I simple MsgBox(0,"",@AutoItExe) test should help... What does the msgbox show?Lar.BTW, I use @ScriptFullPath myself.Lar.I have tried these same things, resulting in:"G:\AutoIt Projects\PCdie4RS\RSsdnr1007.au3" ShowLog"G:\AutoIt Projects\PCdie4RS\RSsdnr1007.au3" ShowHTMLwhere they SHOULD read:"C:\Program Files\Tools\File\Compression\RarSlave.exe" ShowLog"C:\Program Files\Tools\File\Compression\RarSlave.exe" ShowHTML Link to comment Share on other sites More sharing options...
Developers Jos Posted June 13, 2006 Developers Share Posted June 13, 2006 I have tried these same things, resulting in:where they SHOULD read:You need to compile the script and run the EXE version.The result you see is when you run the AU3 file.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
NTKBO Posted June 13, 2006 Author Share Posted June 13, 2006 While ProcessExists($Pid) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE If GUICtrlRead($DispLog) = 1 Then ; Create shortcut to Log file FileCreateShortcut(@ScriptFullPath, @StartupDir & "\ShowLog.lnk", "C:\", "ShowLog", "Show RarSlave Output Log") EndIf If GUICtrlRead($HTML) = 1 Then ; Create shortcut to HTML Log file FileCreateShortcut(@ScriptFullPath, @StartupDir & "\ShowHTML.lnk", "C:\", "ShowHTML", "Show RarSlave HTML Log") EndIf Exit Case Else ;;; EndSelect WEnd Same results. Link to comment Share on other sites More sharing options...
NTKBO Posted June 13, 2006 Author Share Posted June 13, 2006 (edited) You need to compile the script and run the EXE version.The result you see is when you run the AU3 file....I am compiling it first (beta Compile)I run a test first to see the output if computer shut down is averted, then run it again allowing shut down.I get the same results. Thanks for the replies, though ! I don't think I've ever actually run an un-compiled script yet. Edited June 13, 2006 by NTKBO Link to comment Share on other sites More sharing options...
nfwu Posted June 14, 2006 Share Posted June 14, 2006 Are you running it by selecting Tools > Beta Run or directly clicking on the exe? #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() 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