Jump to content

Confirm script:


Recommended Posts

Good day,
I hope that the day finds you all very well!

Would someone be so kind as to confirm the following script?:

; -----------------------------------------------
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
; -----------------------------------------------
Opt("MustDeclareVars", 1)
; -----------------------------------------------
_SelectEdlFile()
; -----------------------------------------------
Func _SelectEdlFile()
    While 1
        Local $sMessage = "Open Session File"
        Local $_SelectEdlFile = FileOpenDialog($sMessage, "C:\SAWStudio64\Audio", "Session File (*.edl)", $FD_FILEMUSTEXIST)
        ; -----------------------------------------------
        Select
            Case @error = 1
                MsgBox($MB_TOPMOST, "NOTICE!", "No valid Session .edl data file was selected." & @CRLF & "Please select a valid Session .edl data file")
                ContinueLoop
            Case @error <> 1
                _LaunchTTA()
                _LaunchEdl($_SelectEdlFile)
                ExitLoop
        EndSelect
    WEnd
EndFunc   ;==>_SelectEdlFile
; -----------------------------------------------
Func _LaunchTTA()
    Local $_sSrcPath = "C:\Windows\toggleTaskbarAutohide.exe"
    ; -----------------------------------------------
    Run($_sSrcPath)
    Sleep(100)
EndFunc   ;==>_LaunchTTA
; -----------------------------------------------
Func _LaunchEdl($_SelectEdlFile)
    Local $_sSrcPath1 = "C:\RML\SAW\SAWStudio64.exe "
    Local $_sSrcPath2 = $_sSrcPath1 & $_SelectEdlFile
    ; -----------------------------------------------
    Run($_sSrcPath2)
    ; -----------------
    MouseMove(340, 195, 0)
    Sleep(2000)
EndFunc   ;==>_LaunchEdl
; -----------------------------------------------

Any comments and|or suggestion would be greatly appreciated.

Note: If there ARE ERRORS, please just note the error and why you believe this to be so, and I will  do my utmost to resolve the issue! Thank!

Edited by mr-es335
Link to comment
Share on other sites

; -----------------------------------------------
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
; -----------------------------------------------
Opt("MustDeclareVars", 1)
; -----------------------------------------------
_SelectEdlFile()
; -----------------------------------------------
Func _SelectEdlFile()
    While 1
        Local $sMessage = "Open Session File"
        Local $_SelectEdlFile = FileOpenDialog($sMessage, "C:\SAWStudio64\Audio", "Session File (*.edl)", $FD_FILEMUSTEXIST)
        If FileExists($_SelectEdlFile) Then ExitLoop
        MsgBox($MB_TOPMOST, "NOTICE!", "No valid Session .edl data file was selected." & @CRLF & "Please select a valid Session .edl data file")
    WEnd
EndFunc   ;==>_SelectEdlFile
; -----------------------------------------------
Func _LaunchTTA()
    Local $_sSrcPath = "C:\Windows\toggleTaskbarAutohide.exe"
    ; -----------------------------------------------
    Run("C:\Windows\toggleTaskbarAutohide.exe")
    Sleep(100)
EndFunc   ;==>_LaunchTTA
; -----------------------------------------------
Func _LaunchEdl($_SelectEdlFile)
    Local $_sSrcPath1 = FileGetShortName("C:\RML\SAW\SAWStudio64.exe")
    Local $_sSrcPath2 = $_sSrcPath1 & ' "' & $_SelectEdlFile & '"' ; to avoid problems if empty space in path
    ;ConsoleWrite("$_sSrcPath2: " & $_sSrcPath2 & @CRLF)
    ; -----------------------------------------------
    Run($_sSrcPath2)
    ; -----------------
    MouseMove(340, 195, 0)
    Sleep(2000)
EndFunc   ;==>_LaunchEdl
; -----------------------------------------------

 

I know that I know nothing

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   1 member

×
×
  • Create New...