Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=..\tool.ico
- #AutoIt3Wrapper_UseX64=n
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <Date.au3>
- #include <ScreenCapture.au3>
- #include <Misc.au3>
- #include <Array.au3>
- #include <File.au3>
- If _Singleton("instance1", 1) = 0 Then
- MsgBox(0, "", "Already Running")
- Exit
- EndIf
- Global $cursor = True
- Global $time = StringReplace(_Now(), ":", ";")
- Global $t = StringReplace($time, "/", "_")
- Global $showCONFIRM = False
- ;Global $driveLabel = InputBox("Drive...", "Drive label for USB", "F:\")
- ;If $driveLabel = "" Or Not FileExists($driveLabel) Then
- ;MsgBox(0, "Exiting...", "No Drive")
- ;Exit
- ;EndIf
- ;Global $dir = $driveLabel & "Screens"
- Local $sDrive = "", $sDir = "", $sFilename = "", $sExtension = ""
- Local $aPathSplit = _PathSplit(@ScriptFullPath, $sDrive, $sDir, $sFilename, $sExtension)
- Global $dir = @ScriptDir & "\" & $sFilename & " Screens"
- Global $count = 0
- Global $cShow = False
- global $JpgQual = 100
- Global $Clicked = False
- Global $usr = @UserName
- Opt("TrayMenuMode", 1) ;remove standard menu
- global $t_openDir = TrayCreateItem("Open Screen(s) folder")
- global $t_exit = TrayCreateItem("Exit")
- func test()
- MsgBox(0,"", "Hid")
- EndFunc
- Func Msg($msg, $title = "")
- MsgBox(0, $title, $msg)
- EndFunc ;==>Msg
- If $CmdLine[0] > 0 Then ; 1 check trick
- If $CmdLine[0] = 1 Then commandLineProcess($CmdLine[1])
- EndIf
- Func commandLineProcess($command)
- If $command > 0 Then
- ;$showCONFIRM = False
- $JpgQual = $command
- EndIf
- EndFunc ;==>commandLineProcess
- While True
- If _IsPressed(01) Then
- If Not FileExists($dir & "\" & $usr & " - " & $t) Then DirCreate($dir & "\" & $usr & " - " & $t)
- If FileExists($dir & "\" & $usr & " - " & $t) Then
- _ScreenCapture_SetJPGQuality($JpgQual)
- _ScreenCapture_Capture($dir & "\" & $usr & " - " & $t & "\" & $usr & " - Capture-" & $count & ".jpg", 0, 0, -1, -1, $cursor)
- $count += 1
- EndIf
- EndIf
- If $showCONFIRM Then
- If Not $cShow Then
- If $count > 0 Then
- $cShow = True
- MsgBox(0, "", "Success", 0.5)
- ;TrayTip(@ScriptName, "Executing success!", 2, 0)
- EndIf
- EndIf
- EndIf
- switch TrayGetMsg()
- case $t_openDir
- ShellExecute($dir & "\" & $usr & " - " & $t)
- If @error <> 0 Then
- MsgBox(64, "Error", "Cannot find the folder, this is likely because you haven't clicked the mouse once, yet")
- endif
- case $t_exit
- Exit
- EndSwitch
- Sleep(10)
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement