Jump to content

Finding One's self... Breathe deep.


Recommended Posts

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
Link to comment
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)

Link to comment
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

Link to comment
Share on other sites

  • Developers

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

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...