Jump to content

Autosaver


RongYao
 Share

Recommended Posts

Hello guys hehe, I wanted to upload a script i've edited. Thought, it is the photoshop autosaver, just managed to change it to suit any program and to have custom amount of time which you can choose.

Forked from Photoshop autosaver
Original: '?do=embed' frameborder='0' data-embedContent>>
Credits goes to: stoyan for the awesome idea and the script

Input box used from UpDown Controls
Original:
Credits goes to: GaryFrost for the awesome inputbox

GUI rocker button
Original:
Credits goes to: abberration for the awesome button example.

  • Autosaves only when a Photoshop window or Photoshop undocked document is active
    Autosaves any program's document which window or class is predefined in Autosave.txt
  • Autosaves only the active document
  • Fixed autosave interval (10 minutes)
    Custom autosave interval (from 1 to 1440 minutes / 1 day)
  • Doesn't keep backups
  • The tray tooltip shows the remaining time in seconds
  • You can dynamically insert or remove programs from the list without stopping the script.
  • You can have tooltip or traytip notifications.

The script depends on the file Autosave.txt which should be in the same directory as the script or the executable to work.
There you should put the titles and classes.

Autosave.txt - EXAMPLE

[Title:CLIP STUDIO PAINT]
[Class:742DEA58-ED6B-4402-BC11-20DFC6D08040]
[Class:Photoshop]
[Class:OWL.DocumentWindow]

You can use AutoIt Window Info to get those or if someone wants to improve it to add get window title or class from pid there. ;D Which will be usefull too, also custom hotkey will be usefull still I don't know how to achieve that now.

Heres the script.

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>

Opt('TrayMenuMode', 1)

Global $Exit = TrayCreateItem('Exit')
Global $start = 0

Global $title = GUICreate("Time to autosave?",320,170,-1,-1)
Global $text = GUICtrlCreateLabel("Enter time in minutes to run autosave!" & @LF & "From 1 minute to 1440 minutes (1 day)!" & @LF & "Enter a time and press (X) to close the window." & @LF & "You may quit with clicking Exit from the quicktray.","", -1, -1)
Global $inputbox = GUICtrlCreateInput("10",10,10, 50, 20, $ES_NUMBER)
Global $updown = GUICtrlCreateUpdown($inputbox)
GUICtrlSetLimit($updown,1440,0)
Global $old = 10
; Attempt to resize input control
GUICtrlSetPos($inputbox, 10,10, 300, 50 )
GUICtrlSetPos($text, 10,70, 300, 70 )

GUISetState(@SW_SHOW)

; Run the GUI until the dialog is closed

While 1
    $input = GUICtrlRead($inputbox)
    $msg = GUIGetMsg()
    If $old <> Int(GUICtrlRead($inputbox)) Then
        If $old < Int(GUICtrlRead($inputbox)) Then; up
            $old = ((Int(GUICtrlRead($inputbox)) - $old) * 1) + $old
            If $old > 1440 Then $old = 0
            GUICtrlSetData($inputbox,$old)
        Else
            $old = (($old - Int(GUICtrlRead($inputbox))) * -1) + $old
            If $old < 0 Then $old = 0
            GUICtrlSetData($inputbox,$old)
        EndIf
     EndIf

   If $msg = $GUI_EVENT_CLOSE Then GUIDelete($title)
   If $msg = $GUI_EVENT_CLOSE Then Exitloop

WEnd

If $input = 0 Then $input = 10
Global $interval = (1000 * ($input * 60))

While True
    Global $Msg = TrayGetMsg()

    Switch $Msg
        Case $Exit
            ExitLoop
    EndSwitch

    Global $delta = TimerDiff($start)
    Global $remaining = Round(($interval - $delta) / 1000)
    TraySetToolTip('Next autosave in ' & $remaining & ' seconds')

    If ($delta > $interval) Then
        Autosave()
        $start = TimerInit()
     EndIf

WEnd

Func Autosave()
$titlefile = "autosave.txt"
FileOpen($titlefile, 0)
For $i = 1 to _FileCountLines($titlefile)
    If WinActive(FileReadLine($titlefile, $i)) Then
        Send('^s')
   endif
Next
FileClose($titlefile)
EndFunc

How to use: run it, type the desired number from 1 to 1440 which indicates minutes, then press X on the window, program will minimize and start counting down, you can click on the tray icon right click and Exit to exit the script.
The default value is 10 minutes.
Also if you enter 0 minutes it will fallback to 10 minutes to prevent loop of autosaving which is a bad thing to happen.

You cannot enter letters and numbers above 1440, thanks to the awesome input box which i finally figured how it works in autoit, also you have up and down controls.
- Rong

UPDATE: 19 September 2014
It checks if the file exist and if it doesn't shows red coloured text below the usual text. (i did that purely for example purposes, the program does not write into the file so you can create it manually in the folder anyway.)
It binds esc for exit and enter to run.
Removed minimize because it glitches up.
Binding arrow keys to raise or lower the values with keyboard arrows.

2014_09_19_181124.png
 

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <ColorConstants.au3> ; It is needed for the warning colour
#include <Misc.au3>

Opt('TrayMenuMode', 1)

Global $Exit = TrayCreateItem('Exit')
Global $start = 0

Global $title = GUICreate("Time to autosave?",330,195,-1,-1, $WS_CAPTION + $WS_SYSMENU)
Global $text = GUICtrlCreateLabel("Enter time in minutes from 1 minute to 1440 (1 day) and press [ X ] or ENTER to run autosave or press ESC to exit! While running click with right mouse button on the tray icon and Exit to quit.","", -1, -1)

Global $inputbox = GUICtrlCreateInput("10",10,10, 50, 25, $ES_NUMBER)
Global $updown = GUICtrlCreateUpdown($inputbox, $UDS_WRAP + $UDS_ARROWKEYS + $UDS_ALIGNRIGHT)
GUICtrlSetLimit($updown,1440,0)
Global $old = 10
; Attempt to resize input control
GUICtrlSetPos($inputbox, 10,10, 310, 30 )
GUICtrlSetPos($text, 10,50, 310, 70 )

Filecheck()
Func Filecheck()
Global Const $titlefile = @ScriptDir & "\autosave.txt"
If not FileExists($titlefile) Then
   Global $note = 'File ' & $titlefile & @LF & 'was not found!'
   ; Warning message options here
   Global $warning = GUICtrlCreateLabel($note,"", -1, -1) ; Warning message
   GUICtrlSetColor($warning, $COLOR_RED) ; Warning colour
   GUICtrlSetPos($warning, 10,130, 315, 190) ; Warning position
Else
   Global $note = ''
   Global $warning = ''
   EndIf
EndFunc

GUISetState(@SW_SHOW)

; Run the GUI until the dialog is closed

While 1
    $input = GUICtrlRead($inputbox)
    $msg = GUIGetMsg()
    If $old <> Int(GUICtrlRead($inputbox)) Then
        If $old < Int(GUICtrlRead($inputbox)) Then; up
            $old = ((Int(GUICtrlRead($inputbox)) - $old) * 1) + $old
            If $old > 1440 Then $old = 0
            GUICtrlSetData($inputbox,$old)
        Else
            $old = (($old - Int(GUICtrlRead($inputbox))) * -1) + $old
            If $old < 0 Then $old = 0
            GUICtrlSetData($inputbox,$old)
        EndIf
     EndIf

   If $msg = $GUI_EVENT_CLOSE or _IsPressed("0D") Then GUIDelete($title)
   If $msg = $GUI_EVENT_CLOSE or _IsPressed("0D") Then Exitloop
   If _IsPressed("1B") Then Exit

WEnd

If $input = 0 Then $input = 10
Global $interval = (1000 * ($input * 60))

While True
    Global $Msg = TrayGetMsg()

    Switch $Msg
        Case $Exit
            ExitLoop
    EndSwitch

    Global $delta = TimerDiff($start)
    Global $remaining = Round(($interval - $delta) / 1000)
    TraySetToolTip('Next autosave in ' & $remaining & ' seconds')

    If ($delta > $interval) Then
        Autosave()
        $start = TimerInit()
     EndIf

WEnd

Func Autosave()
FileOpen($titlefile, 0)
For $i = 1 to _FileCountLines($titlefile)
    If WinActive(FileReadLine($titlefile, $i)) Then
        Send('^s')
   endif
Next
FileClose($titlefile)
EndFunc

UPDATE: 23 September 2014
It has notifications via tooltip or tray tip, by default those are off, those notify you 3 seconds before save process start so to be aware of it while drawing or whatever you do there.
autosaver.gif

#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <ColorConstants.au3> ; It is needed for the warning colour
#include <Misc.au3>
#include <GuiButton.au3>

Opt('TrayMenuMode', 1)

Global $Exit = TrayCreateItem('Exit')
Global $start = 0

Global $title = GUICreate("Time to autosave?",330,195,-1,-1, $WS_CAPTION + $WS_SYSMENU)
Global $text = GUICtrlCreateLabel("Enter time in minutes from 1 minute to 1440 (1 day) and press [ X ] or ENTER to run autosave or press ESC to exit! While running click with right mouse button on the tray icon and Exit to quit.","", -1, -1)

Global $inputbox = GUICtrlCreateInput("10",10,10, 50, 25, $ES_NUMBER)
Global $updown = GUICtrlCreateUpdown($inputbox, $UDS_WRAP + $UDS_ARROWKEYS + $UDS_ALIGNRIGHT)
GUICtrlSetLimit($updown,1440,0)
Global $old = 10
; Attempt to resize input control
GUICtrlSetPos($inputbox, 130,10, 190, 30 )
GUICtrlSetPos($text, 10,50, 310, 70 )

Global $readButton = "Notifications Off"
Global $Button1 = GUICtrlCreateButton("Notifications Off", 10, 10, 115, 30, 0)
; GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor ($Button1, 0xFF0000)

Filecheck()
Func Filecheck()
Global Const $titlefile = @ScriptDir & "\autosave.txt"
If not FileExists($titlefile) Then
   Global $note = 'File ' & $titlefile & @LF & 'was not found!'
   ; Warning message options here
   Global $warning = GUICtrlCreateLabel($note,"", -1, -1) ; Warning message
   GUICtrlSetColor($warning, $COLOR_RED) ; Warning colour
   GUICtrlSetPos($warning, 10,130, 315, 190) ; Warning position
Else
   Global $note = ''
   Global $warning = ''
   EndIf
EndFunc

Func _ToggleButton()
    Global $readButton = _GUICtrlButton_GetText($Button1)
    If $readButton = "Notifications Off" Then
        Global $readButton = "Notifications On"
        _GUICtrlButton_SetText($Button1, "Notifications On")
        GUICtrlSetBkColor ($Button1, 0x87f717)
   ElseIf $readButton = "Notifications On" Then
        Global $readButton = "Notify Via Tray"
        _GUICtrlButton_SetText($Button1, "Notify Via Tray")
        GUICtrlSetBkColor ($Button1, 0x75abf6)
     Else
        Global $readButton = "Notifications Off"
        _GUICtrlButton_SetText($Button1, "Notifications Off")
        GUICtrlSetBkColor ($Button1, 0xFF0000)
    EndIf
EndFunc

GUISetState(@SW_SHOW)

; Run the GUI until the dialog is closed

While 1
    $input = GUICtrlRead($inputbox)
    $msg = GUIGetMsg()
    If $old <> Int(GUICtrlRead($inputbox)) Then
        If $old < Int(GUICtrlRead($inputbox)) Then; up
            $old = ((Int(GUICtrlRead($inputbox)) - $old) * 1) + $old
            If $old > 1440 Then $old = 0
            GUICtrlSetData($inputbox,$old)
        Else
            $old = (($old - Int(GUICtrlRead($inputbox))) * -1) + $old
            If $old < 0 Then $old = 0
            GUICtrlSetData($inputbox,$old)
        EndIf
     EndIf

   If $msg = $GUI_EVENT_CLOSE or _IsPressed("0D") Then GUIDelete($title)
   If $msg = $GUI_EVENT_CLOSE or _IsPressed("0D") Then Exitloop
   If _IsPressed("1B") Then Exit

    Switch $Msg
        Case $Button1
            _ToggleButton()
    EndSwitch
WEnd

If $input = 0 Then $input = 10
Global $interval = (1000 * ($input * 60))

While True
    Global $Msg = TrayGetMsg()

    Switch $Msg
        Case $Exit
            ExitLoop
    EndSwitch

    Global $delta = TimerDiff($start)
    Global $remaining = Round(($interval - $delta) / 1000)
    TraySetToolTip('Next autosave in ' & $remaining & ' seconds')

    If ($delta > $interval) Then
        Autosave()
        $start = TimerInit()
     EndIf

WEnd

Func Autosave()

FileOpen($titlefile, 0)
For $i = 1 to _FileCountLines($titlefile)
    If WinActive(FileReadLine($titlefile, $i)) Then
      ; Notify before save start here
      If $readButton = "Notifications On" Then
      Global $taskbar = WinGetPos("","Notification Area"); Taskbar x,y,width,height
      Global $x = @DesktopWidth - 170
      Global $y = @DesktopHeight - 48 - $taskbar[3]
      ToolTip("Saving in 3 seconds..." & @CR & @CR & @CR, $x, $y)
      Sleep(3000) ; Wait 3 seconds to show the ToolTip right
      ToolTip ("") ; Removing ToolTip in case it got stuck
   EndIf
   If $readButton = "Notifications Off" Then
      ToolTip ("")
   EndIf
   If $readButton = "Notify Via Tray" Then
         TrayTip("Saving...", "in 3 seconds", 0)
         Sleep(3000)
   EndIF
      ; Notify before save ends here
        Send('^s')
   endif
Next
FileClose($titlefile)
EndFunc
Edited by RongYao
Link to comment
Share on other sites

Hi, I'm new here.

Thank you very much for share the autosaver! It's exactly than I'm searching :thumbsup: , I'm make it my own script some days ago, but with coordinates with the mouse to autosave the Anime Studio Pro, and autosave too all the open or close windows, I'm search and take some ideas from others programers (sorry for no mentioned, but I'm makeit in the fly, I research and I send the credits (if I remember where I'm search to share with you) and my owns, then adapt and join all, but I need the interface to create the time to autosave, and something more to ask for the filename and the path.
 
I still need to tune many details, to make it in two days from the scratch, well, I'm worth something, but still spartan :think: .
I share it, and maybe we find a way to adapt a more universal an better of course, or that they can change the settings depending on the program you need interactively, maybe ask for much, or maybe because we are close to achieving something better, this does increase as the date and time, and with the word "_backup" in the end with strings, and there is a point that I not identified well than creates  the file name on the file name, making the file name very long, but can not find where I went wrong, my squirreli in the wheel not run, and would prefer files such to be increments of 10 and start over, for not create too many files and to recover any of them actually work. another problem that I have is that I can not use all hotkeys Anime Studio Pro, there is no or can be configured to open save, the class is the same as the main window, so he used the mouse pointer and coordinates, which is another detail that is driving me crazy, because the first "pass" pointer makes everything perfect! open the file in the recent backup first movement is very consistent only with the right or left mouse click call Open Recent File and just passing the pointer over the drop down menus, but when the second scheduled backup after x time, obviously the cursor in the same motion coordinates, for some strange reason, the roll window disappears and the mouse continues to move without nothing to clicking! I repeat the movement even in the script and I want to put a "for next" or "if Else", for each pair of times run the movement again (interestingly 2 out of 3 times it does well) but I find unrefined, and very heavy, this is the second time I make a script with autoit, forgive me for the excess code, as I'm said, I haven't refined, that I did in the fly, that was frustrating was ending or moving a job With Anime Stucio Pro (7) and suddenly the program froze, and my forgetfulness not saved or had not made a copy for my urgency to end, and had to start again! why this gross, but I hope that it can complement their work.
 

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\CONCEPTOS DIGITALES LOGOS\LOGO CONCEPTOS DIGITALES 600x600px000.ico
#AutoIt3Wrapper_outfile=Backup Anime Studio Pro X64 Ver 1_0.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment= Make it a Backup directly from Anime Studio Pro 7. Crea un respaldo directamente de Anime Studio Pro 7.
#AutoIt3Wrapper_Res_Description=Crea Respaldo en la Red de Anime Studio Además de Salvar el Original
#AutoIt3Wrapper_Res_Fileversion=1.0.0.19
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=Marcos Rubén Mendoza Hernández
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;If the program not open, show a window message, press escape to exit.
;Si el programa no esta abierto, muestra una ventana con mensaje, teclea Esc para salir.
Opt("Wintextmatchmode",1)
        if not WinExists("[Class:LM_Wnd]") Then
        MsgBox(4096,"No se encuentra Anime Studio Pro","No esta Abierto el Anime Studio Pro, por lo tanto no se puede salvar algún respaldo o archivo.")
        exit
        WinActivate ("[Class:LM_Wnd]","Open Recent")
    EndIf

; Hit the escape key to quit.
;Presiona la tecla Esc para salir.
HotKeySet("{ESC}", "Salir")

; Run the backup every 1000 ms (the time delay of 1 second is just for testing). 10 MIN: 600000, 15 MIN: 900000, 20 MIN: 1200000 ... and so on.
; Corre el respaldo cada 1000 ms (tarda un segundo solo para probar). 10 MIN: 600000, 15 MIN: 900000, 20 MIN: 1200000 ... and so on.
AdlibRegister ( "AnimeSP_Backup" , 1000) ; Change the time delay to a longer period. Puedes cambiar el tiempo en que tarda el período.

While 1 ; Keep the script alive. Matiene el script vivo.
    Sleep(100) ; Reduce memory usage. Reduce el uso de memoria.
    Wend
Func AnimeSP_Backup()
    Local $aAnimeSP, $sText, $hFile, $hPath
    WinActivate("[Class:LM_Wnd]","")
    WinSetState("[Class:LM_Wnd]","",@SW_MAXIMIZE)
    WinSetOnTop("[Class:LM_Wnd]","",1)
    $aAnimeSP = WinList("[Class:LM_Wnd]") ; Get all Anime Studio Pro windows. Toma todas las ventanas de Anime Studio Pro.

    If $aAnimeSP[0][0] Then ; Anime Studio Pro window exist. Anime Studio Pro existe.
            ;You can change this parameters, or modify this part for better. (Use AutoIt Window Info to change the parameters).
            ;Puedes cambiar estos parámetros, o modificar esta parte por algo mejor. (Usa AutoIt Window Info para cambiar los parámetros).
            WinWaitActive("[Class:LM_Wnd]","",1)
            MouseClick("right",25,701,20,30)
            MouseMove(19,33,30)
            MouseClick("left",19,33,1,30)
            ;WinMenuSelectItem("[Class:LM_Wnd]", "&File", "&Open Recent")
            MouseMove(25,89,30)
            MouseMove(338,89,30)
            MouseMove(338,105,30)
            MouseClick("right",25,701,20,30)
            MouseMove(19,33,30)
            MouseClick("left",19,33,1,30)
            ;WinMenuSelectItem("[Class:LM_Wnd]", "&File", "&Open Recent")
            MouseMove(25,89,30)
            MouseMove(338,89,30)
            MouseMove(338,105,30)
            MouseClick("left",338,105,1,30)
            ;Salva el Archivo.
             MouseClick("right",25,701,20,30)
            MouseMove(19,33,30)
            MouseClick("left",19,33,1,30)
            MouseMove(25,157,30)
            MouseClick("left",25,157,1,30)
            ;Here make a pause for view the window of "Save As...".
            ;Aquí hace una pausa para ver la ventana de "Salvar Como...(Save As...)."
            WinWaitActive("[CLASS:#32770]","",2)
            WinWaitActive("[CLASS:Edit; INSTANCE:1]", "", 3)
            MouseClick("left",391,569,1,30)
            For $i = 1 To $aAnimeSP[0][0] ; Run through the list. Corre a través de la lista.
                $sText = WinGetText($aAnimeSP[$i][1]) ; Get the text from each window. Toma el texto de cualquier ventana.
                ; Create a backup name automatically with Hour and Minutes.
                ; Crea un nombre de respaldo automáticamente con Hora y Minutos.

                ; Adjust this by including $aAnimeSP[$i][0] in the title if you wish.
                ; Ajustalo incluyendo $aAnimeSP[$i][0] en el título si lo deseas.
                $hFile = StringTrimRight(@MDAY & "_" & @HOUR & "_" & @MIN & "_" & $aAnimeSP[$i][0], 24) & "_Backup.anme"
                Sleep(1000)
                Send("^a","{DEL}")
                Send($hfile)
                Send("{ENTER}")
                $hPath = @WorkingDir & "\Backup Anime Studio Pro\" ;Here put you path for the backup. Aquí pones la ruta de tu respaldo.
                FileOpen($hPath, 0+1+2+8) ; Creates directory and overwrites any previous backup of the same file. Crea directorios y sobrescribe cualquier copia de seguridad anterior del mismo archivo.
                If @error Then ConsoleWrite("El Archivo Abierto Falló con " & $hPath &@LF) ; Check the file isn't read only. Checa que el archivo no se escriba solamente.
                    FileWrite($hPath, $hFile) ; Write the contents of the window to the backup Anime Studio Pro file. Escribe el contenido de la ventana a el archivo de Anime Studio Pro 7.
                If @error Then ConsoleWrite("El Archivo Escrito Falló Con " & $hPath &@LF) ; Check the file isn't read only. Checa que el archivo no se escriba solamente.
                    FileClose($hPath)
                    Send("y")
                ;Send("n")
            Next
    EndIf
EndFunc
exit

Func Salir()
    Exit
EndFunc

 
 
Another thing, I have problems running your script, this is what appears to me:
 
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "C:UsersAvidDesktopAutosave.au3"
+>07:25:31 Starting AutoIt3Wrapper v.2.0.1.24    Environment(Language:0409  Keyboard:0000080A  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (1.54.19.0)  from:C:Program Files (x86)AutoIt3
C:UsersAvidDesktopAutosave.au3(9,67) : WARNING: $lParam: possibly used before declaration.
Local $tagNMHDR = DllStructCreate("hwnd;uint_ptr;int;int", $lParam)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(9,104) : ERROR: $tagNMHDR previously declared as a 'Const'
Local $tagNMHDR = DllStructCreate("hwnd;uint_ptr;int;int", $lParam) ; NMHDR + 1st element of NMLISTVIEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(19,69) : WARNING: $ES_NUMBER: possibly used before declaration.
Global $inputbox = GUICtrlCreateInput("10",10,10, 50, 25, $ES_NUMBER)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(20,59) : WARNING: $UDS_WRAP: possibly used before declaration.
Global $updown = GUICtrlCreateUpdown($inputbox, $UDS_WRAP +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(20,76) : WARNING: $UDS_ARROWKEYS: possibly used before declaration.
Global $updown = GUICtrlCreateUpdown($inputbox, $UDS_WRAP + $UDS_ARROWKEYS +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(20,93) : WARNING: $UDS_ALIGNRIGHT: possibly used before declaration.
Global $updown = GUICtrlCreateUpdown($inputbox, $UDS_WRAP + $UDS_ARROWKEYS + $UDS_ALIGNRIGHT)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(90,20) : WARNING: $titlefile: possibly used before declaration.
FileOpen($titlefile,
~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3(9,67) : ERROR: $lParam: undeclared global variable.
Local $tagNMHDR = DllStructCreate("hwnd;uint_ptr;int;int", $lParam)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:UsersAvidDesktopAutosave.au3 - 2 error(s), 6 warning(s)
!>07:25:31 AU3Check ended.rc:2
>Exit code: 0    Time: 0.224

 
 
I use Windows 7 64bit than you see, is it maybe that's why?, as I can fix or modify, or that's what I need? :huh2:

Thanks in advance for your help, sorry for my awful english :sweating: .

Greetings.

Link to comment
Share on other sites

Don't forget to use

#include <GUIConstants.au3> ; GUI styles
#include <GUIConstantsEx.au3> ; Needed for ExStyles.
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3> ; For file operations
#include <ColorConstants.au3> ; It is needed for the warning colour
#include <Misc.au3>

also i've wrote the script on SciTE-Lite 3.4.1, last version of autoit and my windows is windows 7 x64, my script works fine for me.

Link to comment
Share on other sites

  • 3 years later...

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