Sign in to follow this  
Followers 0
NTKBO

Finding One's self... Breathe deep.

7 posts in this topic

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. :D (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

Share this post


Link to post
Share on other sites



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)

Share this post


Link to post
Share on other sites

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" ShowHTML

where they SHOULD read:

"C:\Program Files\Tools\File\Compression\RarSlave.exe" ShowLog

"C:\Program Files\Tools\File\Compression\RarSlave.exe" ShowHTML

Share this post


Link to post
Share on other sites

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....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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. :D

Share this post


Link to post
Share on other sites

#6 ·  Posted (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. :D

Thanks for the replies, though ! :D

I don't think I've ever actually run an un-compiled script yet.

Edited by NTKBO

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0