BugFix ...
PERFEKT, danke
Der erste Lauf ist super, den zweiten werden ich so einstellen das nur gepürft wird und keine Meldung, diese wird nur angezeigt, wenn es notwendig ist.
SUPER, vielen Dank @all
BugFix ...
PERFEKT, danke
Der erste Lauf ist super, den zweiten werden ich so einstellen das nur gepürft wird und keine Meldung, diese wird nur angezeigt, wenn es notwendig ist.
SUPER, vielen Dank @all
hat sich wohl überschnitten, lese grade das Posting... werde es testen
melde micht sonst
Danke ![]()
tja jetzt läßt der Frosch die Locken....
theorie und praxis.....
ich kann es nicht als script schreiben....
also erster run setze datum, zweiter run prüfe datum wenn da, dann nicht ernuet setzen, wenn datum älter 7 tage dann run batch...
aber ich weiß nicht wie ich es ins script bekomme... ![]()
ähhm... sorry...
Denkanstoß wäre gut.. aber ein Vorschlag eines Script wäre super, ich weiß nicht wie man das Datum als feste Variable schreib, da der Computer evtl ausgeschaltet wird und nach dem Einschalten ja wieder pürfen muss wieviel Tage sind vergangen nach dem letzten Start, größer 7 Tage dann starte Batch...
Hallo,
ich möchte den Lauf einer Batch über das Datum prüfen.
Ich starte heute das erste mal die Batch, also Tag merken, wenn der PC zb in 5 Tagen wieder gestartet wird soll nichts passieren, aber wenn z.b 7 vergangen sind nach dem letzten Lauf der Batch, dann soll die Batch aufgerufen werden.
Beim ersten Aufrufen soll abgefragt werden in viel Tagen die Prüfung laufen soll.
Das script soll ein Backup anstoßen, wenn das über ein Task läuft kann ich nicht sicherstellen, das min alle 7 Tage gesichert wird.
Gruß
die Varitante 1 von Funky geht.
hi ...
ich rufe erst ein Installation Programm auf. Mit WinWait warte ich auf das Fenster, dann sende ich eine "Enter" damit der Next Button bestätigt wird. Jetzt ist es abhängig vom Netzwerk bzw es dauert eine Zeit x, also erst wenn das Installtion Fenster wieder kommt und der Butto Finish dort drin auftaucht, dann soll entweder ein Enter gesendet werden oder halt der Finish Button gedrückt werden. Besser ist halt ein WinActive mit dem Button, sonst könnte ein User das Script unterbrechen.
Hallo,
ich muss bei einer Intallation auf ein Button im Installationsfenster warten, nur dann soll ein send("{enter}") ausgelöst werden.
Laut Forum geht das mit GUICtrlGetState und Windows Info für die button Abfrage.
Meine Frage: wie erstelle ich die Schleife für die Abfrage?
Gruß und danke
Hi,
die einfachste sich nicht elganteste Möglichkeite wäre:
eine Dos Box öffnen, ein send ( telnet login ..., show mac Befehl ) Befehl absetzen.
Damit müsste es gehen.
Sinn ist die Mac Liste aus eine HP Switch zu erzeugen per telnet auf ein tftp Server.
Der Export wird dann weiter verarbeitet.
Geht das nicht eleganter?
Gruß
fertig und geht, danke an all die sich beteidigt haben ...
Hallo,
um erstmal die ganzen Funktion und Hotkeys zuverstehen. Habe ich eins etwas verändert, um es zu prüfen was passiert.
[autoit]
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
While 1
Sleep(3000)
MsgBox(4096,"",$Paused,2)
WEnd
Func TogglePause()
sleep (200)
$Paused = NOT $Paused
EndFunc
Func Terminate()
Exit 0
EndFunc
Der Anfang ist klar die Variable zeigt keinen Wert an.
Drücke ich jetzt eine Taste springt es zur Funktion auch klar, jetzt wird die Vari wohl ungleich gesetzt ???
Und als Überprfung kommt ein True raus, warum?
Und wieder gedrückt kommt ein False raus auch hier, warum
Gruß
Edit BugFix: Bitte KEINE Leerzeichen in den Tags, sonst sind sie unwirksam!!
hi Bugfix,
ich prüfe händisch in einem Forum Bilder, leider musste ich bisher dies immer manuelle machen.
Um eine automatischmus zu bekommen dachte ich ich programmiere ein Script.
Ja und da ist das erste Prob, das Denken ... ;>;)
Spaß, also das Script muss an der Stelle pos_x und pos_y einen Mausklick machen, Sec x verweilen und in dieser Zeit entscheide ich ob das Bild gespeichert wird, oder nicht. Also auch hier wieder mit einem Hotkey ne Speicherfunktion. Evtl auch eine Art autospeichern dann wird halt jedes Bild das angezeigt wird gespeichert.
kl Edit:
ich prüfe erstmal die ganzen Funktionen und deren Auswirkungen ... da fehlt es mir wohl, aber so langsam .... man muss es hlat ers verstehnen sonst bringt es überhauptnichts ....
Gruß
denke das wäre die Routine .... geht aber nicht ...
[autoit]
While True
If $bSleep Then
Sleep($iSleep)
$bSleep = False
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
EndIf
Sleep(10) ; wegen Prozessorlast
WEnd
dachte in der Schleife wird alles wiederholt, so müsste nachen dem Sleep doch wieder der Maus Befehl kommen ... , oder?
Edit BugFix: Tags OHNE Leerzeichen [ autoit ]
also die Grundfunktion soll sein:
-ein Mausklick an Pos x 1266 und Pos y 154
-der Klick soll variabel sein ( 2,5,10 secund verzögerung )
-die Position soll einstellbar sein
-und die Speicherfunktion wie im Script unter speichern ( Mauspos ändern, rechtsklick, warten auf Fenster dann ein send enter und wieder zum Mausklick
gerne nehme ich ein anderen Gedankengang entgegen.
gruß
moin,
den Befehl habe ich gesetzt ... bewirkt aber nichts ..???
Mir geht es um jede Funktion, sobald ich die Funktion verlasse springt das Script nicht dorthin zurück.
Denke eher das es ein allgemeiner Denkfehler ist ..
moin,
denke nicht das es ein grunsätzlicher Fehler ist, evtl bin ich etwas umständlich daran gegangen ...
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!s", "speichern")
HotKeySet("+!w", "weiter")
HotKeySet("+!2", "weiter2")
HotKeySet("+!5", "weiter5")
HotKeySet("+!1", "weiter10")
HotKeySet("+!c", "config")
HotKeySet("+!a", "config_auslesen")
HotKeySet("p", "pause")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("+!d", "delay")
;MsgBox(4096, "-------- Info Auto_Fox ---------", "Bedienungsanleitung" & @CRLF & "Diese Hotkey sind aktive" & @CRLF & "ESC = Exit Programm" & @CRLF & "Shift plus Alt und p = Config" & @CRLF & "p = Pause" & @CRLF & "Shift plus Alt und s = speichern", 5)
[/autoit] [autoit][/autoit] [autoit]$pos_x = 0
$pos_y = 0
Global $Paused
[/autoit] [autoit][/autoit] [autoit]If Fileexists("C:\Temp\auto_fox_x.ini") then send("+!a")
Send("+!c")
Func delay()
$delay = InputBox("-------- Info Auto_Fox ---------", "Anzeigedauer für Bilder angeben:" & @CRLF & "2 für 2sec" & @CRLF & "5 für 5sec" & @CRLF & "10 für 10sec")
;If $delay = 2 Then send("+!2")
;EndIf
;If $delay = 5 then send("+!5")
;EndIf
;If $delay = 10 then send("+!1")
;EndIf
EndFunc
Func config_auslesen()
$pos_x = IniRead("C:\Temp\auto_fox_x.ini", "Wert x", "key", "NotFound")
$pos_y = IniRead("C:\Temp\auto_fox_y.ini", "Wert y", "key", "NotFound")
$save = 0
$go = 1
Send("{PAUSE}")
EndFunc
Func config()
$save = 0
$go = 1
$pos_x = InputBox("Maus Position Horizontal eingeben", "alter Wert war 1266")
Sleep(400)
IniWrite("C:\Temp\auto_fox_x.ini", "Wert x", "key", $pos_x)
$pos_y = InputBox("Maus Position Vertikal eingeben", "alter Wert war 257, 154 bei F11")
Sleep(400)
IniWrite("C:\Temp\auto_fox_y.ini", "Wert y", "key", $pos_y)
MsgBox(4, "-------- Info Auto_Fox ---------", "Firefox mit F11 starten", 5)
WinWaitActive("Mozilla Firefox")
If Not WinActive("Mozilla Firefox") Then WinActivate("Mozilla Firefox")
$answer6 = MsgBox(4, "-------- Info Auto_Fox ---------", "MausPosition wird geprüft, weiter?")
If $answer6 = 7 Then
MsgBox(4, "-------- Info Auto_Fox ---------", "Die Config wird wiederholt", 5)
send("+!c")
EndIf
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
Sleep(4000)
$answer5 = MsgBox(4, "-------- Info Auto_Fox ---------", "Ist die MausPosition okay?")
If $answer5 = 7 Then Send("+!c")
MsgBox(4, "-------- Info Auto_Fox ---------", "Auto_Fox wird mit der Funktion weiter gestartet", 4)
Send("+!w")
EndFunc
Func weiter()
$save = 0
$go = 1
While 1 = 1
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
Sleep (4000)
WEnd
EndFunc
Func weiter2()
While 1 = 1
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
Sleep (2000)
WEnd
EndFunc
Func weiter5()
While 1 = 1
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
Sleep (5000)
WEnd
EndFunc
Func weiter10()
While 1 = 1
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
Sleep (10000)
WEnd
EndFunc
Func speichern()
$save = 1
$go = 0
While 1 = 1
MouseMove($pos_x,$pos_y)
MouseDown("left")
MouseUp("left")
Sleep(3500)
MouseMove(1050,500)
MouseDown("right")
MouseUp("right")
MouseMove(1055,572)
MouseDown("left")
MouseUp("left")
WinWaitActive("Grafik speichern")
If Not WinActive("Grafik speichern") Then WinActivate("Grafik speichern")
Send("{ENTER}")
;sleep(1000)
Wend
EndFunc
Func Terminate()
Exit 0
EndFunc
Func pause()
$answer = MsgBox(4, "-------- Info Auto_Fox ---------", "Das Programm steht auf PAUSE. Weiter?")
If $answer = 7 Then
MsgBox(4096, "AutoIt", "OK. Bye!")
Exit
EndIf
$answer2 = MsgBox(4, "-------- Info Auto_Fox ---------", "Weiter mit der Speicherfunktion")
If $answer2 = 7 Then
; MsgBox(4096, "AutoIt", "OK. Bye!")
send("+!w")
EndIf
send("+!s")
EndFunc
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
Sleep(100)
Send("+!s")
EndFunc
Die Idee war das man einen Mausclick hat, aber auch wählen kann zwischen einer Speicherfunktion und einer Config, incl Pause. Als "Luxus" gilt das das Programm die Configwert abspeichert und beim Start wieder einliest und prüft.
Sollte es einfacher gehen, bin ich gerne bereit es umzuschreiben.
Gruß
Edit BugFix: formatiert und Tags gesetzt
Hallo,
ich habe folgendes Problem.
Am Anfang des Script habe ich diverse Hotkey definiert. Benutze ich einen Hotkey zum Sprung in eine Funktion geht alles Okay. Betätige ich jetzt z.b. den Hotkey für die Pause, dann springt das Programm in die Funktion Pause.
Damit kommt das Script nicht wieder in die alte Stelle der Funktion aus dem es gekommen ist.
Ein Funktion macht einem Mausklick an einer Stelle und dann wird z.b ein Bild gespeichert. Verlasse ich jetzt mit der Pause Funktion das Script weiß das Programm nicht mehr das es vorher in der Funktino "Mausklick und speichern" war.
wie kann man das regeln.
Ich habe überlegt vorher eine Vari zusetzten ist der Wert gleich 1 dann sprigen wieder in die Funktion, läuft aber nicht.
Danke vorab ....
gruß
Function SendParameters
keys
The sequence of keys to send.
flag
[optional] Changes how "keys" is processed:
flag = 0 (default), Text
contains special characters like + and ! to indicate SHIFT and ALT
key-presses.
flag = 1, keys are sent raw.
Return Value
None.
Remarks
See the Appendix for
some tips on using Send. AutoIt can send all ASCII and Extended ASCII characters (0-255), to
send UNICODE
characters you must use the "ASC" option and the code of the character you wish
to send (see {ASC}
at the bottom of the table below).
The "Send" command syntax is
similar to that of ScriptIt and the Visual Basic "SendKeys" command. Characters
are sent as written with the exception of the following
characters:
'!'
This tells AutoIt to send an ALT keystroke,
therefore Send("This is text!a") would send the keys "This is
text" and then press "ALT+a".
N.B. Some programs are very choosy about
capital letters and ALT keys, i.e. "!A" is different to "!a". The first says
ALT+SHIFT+A, the second is ALT+a. If in doubt, use lowercase!
'+'
This
tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would
send the text
"HellO". Send("!+a") would send "ALT+SHIFT+a".
'^'
This tells AutoIt to
send a CONTROL
keystroke, therefore Send("^!a") would send "CTRL+ALT+a".
N.B. Some programs are very
choosy about capital letters and CTRL keys, i.e. "^A" is different to "^a". The
first says CTRL+SHIFT+A, the second is CTRL+a. If in doubt, use
lowercase!
'#'
The hash now sends a Windows keystroke; therefore,
Send("#r") would
send Win+r which
launches the Run dialog box.
You can set SendCapslockMode to make CAPS
LOCK disabled at the start of a Send operation and restored upon completion.
However, if
a user is holding down the Shift key when a Send function begins,
text may be sent in uppercase.
One workaround is to Send("{SHIFTDOWN}{SHIFTUP}") before the other Send
operations.
Certain keyboard as the Czech one send different characters
when using the Shift Key or being in CAPS LOCK enabled and sending a char. Due
to the send AutoIt
implementation the CAPS LOCKed char will be sent as Shifted one so it will
not work.
Certain special keys can be sent and should be enclosed in
braces:
N.B. Windows does not allow the simulation of the "CTRL-ALT-DEL"
combination!
Send Command (if zero flag)
Resulting Keypress
{!}
!
{#}
#
{+}
+
{^}
^
{{}
{
{}}
}
{SPACE}
SPACE
{ENTER}
ENTER key on the main keyboard
{ALT}
ALT
{BACKSPACE} or {BS}
BACKSPACE
{DELETE} or {DEL}
DELETE
{UP}
Up arrow
{DOWN}
Down arrow
{LEFT}
Left arrow
{RIGHT}
Right arrow
{HOME}
HOME
{END}
END
{ESCAPE} or {ESC}
ESCAPE
{INSERT} or {INS}
INS
{PGUP}
PageUp
{PGDN}
PageDown
{F1} - {F12}
Function keys
{TAB}
TAB
{PRINTSCREEN}
Print Screen key
{LWIN}
Left Windows key
{RWIN}
Right Windows key
{NUMLOCK on}
NUMLOCK (on/off/toggle)
{CAPSLOCK off}
CAPSLOCK (on/off/toggle)
{SCROLLLOCK toggle}
SCROLLLOCK (on/off/toggle)
{BREAK}
for Ctrl+Break processing
{PAUSE}
PAUSE
{NUMPAD0} - {NUMPAD9}
Numpad digits
{NUMPADMULT}
Numpad Multiply
{NUMPADADD}
Numpad Add
{NUMPADSUB}
Numpad Subtract
{NUMPADDIV}
Numpad Divide
{NUMPADDOT}
Numpad period
{NUMPADENTER}
Enter key on the numpad
{APPSKEY}
Windows App key
{LALT}
Left ALT key
{RALT}
Right ALT key
{LCTRL}
Left CTRL key
{RCTRL}
Right CTRL key
{LSHIFT}
Left Shift key
{RSHIFT}
Right Shift key
{SLEEP}
Computer SLEEP key
{ALTDOWN}
Holds the ALT key down until {ALTUP} is sent
{SHIFTDOWN}
Holds the SHIFT key down until {SHIFTUP} is sent
{CTRLDOWN}
Holds the CTRL key down until {CTRLUP} is sent
{LWINDOWN}
Holds the left Windows key down until {LWINUP} is sent
{RWINDOWN}
Holds the right Windows key down until {RWINUP} is sent
{ASC nnnn}
Send the
ALT+nnnn key combination
{BROWSER_BACK}
2000/XP Only: Select the browser "back" button
{BROWSER_FORWARD}
2000/XP Only: Select the browser "forward" button
{BROWSER_REFRESH}
2000/XP Only: Select the browser "refresh" button
{BROWSER_STOP}
2000/XP Only: Select the browser "stop" button
{BROWSER_SEARCH}
2000/XP Only: Select the browser "search" button
{BROWSER_FAVORITES}
2000/XP Only: Select the browser "favorites" button
{BROWSER_HOME}
2000/XP Only: Launch the browser and go to the home page
{VOLUME_MUTE}
2000/XP Only: Mute the volume
{VOLUME_DOWN}
2000/XP Only: Reduce the volume
{VOLUME_UP}
2000/XP Only: Increase the volume
{MEDIA_NEXT}
2000/XP Only: Select next track in media player
{MEDIA_PREV}
2000/XP Only: Select previous track in media player
{MEDIA_STOP}
2000/XP Only: Stop media player
{MEDIA_PLAY_PAUSE}
2000/XP Only: Play/pause media player
{LAUNCH_MAIL}
2000/XP Only: Launch the email application
{LAUNCH_MEDIA}
2000/XP Only: Launch media player
{LAUNCH_APP1}
2000/XP Only: Launch user app1
{LAUNCH_APP2}
2000/XP Only: Launch user app2
To send the ASCII value A
(same as pressing ALT+065 on the numeric keypad)
Send("{ASC
065}")
(When using 2 digit ASCII codes you must use a leading 0,
otherwise an obsolete 437 code page is used).
To send UNICODE characters
enter the character code (decimal or hex), for example this sends a Chinese
character
Send("{ASC 2709}") or Send("{ASC
0xA95}")
Single keys can also be repeated, e.g.
Send("{DEL 4}") ;Presses
the DEL key 4 times
Send("{S 30}") ;Sends 30 'S' characters
Send("+{TAB 4}") ;Presses
SHIFT+TAB 4 times
The key will be send at least once even if the count is zero.
To
hold a key down (generally only useful for games)
Send("{a down}") ;Holds
the A key down
Send("{a up}") ;Releases the A key
To set the state
of the capslock, numlock and scrolllock keys
Send("{NumLock on}")
;Turns the NumLock key on
Send("{CapsLock off}") ;Turns the CapsLock key
off
Send("{ScrollLock toggle}") ;Toggles the state of
ScrollLock
If you wish to use a variable for the count, try
$n =
4
Send("+{TAB " & $n & "}")
If you wish to
send the ASCII
value A four times, then try
$x = Chr(65)
Send("{" & $x & "
4}")
Most laptop computer keyboards have a special Fn key. This key
cannot be simulated.
Note, by setting the flag parameter to 1 the above
"special" processing will be disabled. This is useful when you want to send some text copied
from a variable and you want the text sent exactly as written.
For
example, open Folder Options (in the control panel) and try the following:
Send("{TAB}")
Navigate to next control (button, checkbox,
etc)
Send("+{TAB}")
Navigate to previous control.
Send("^{TAB}")
Navigate to next WindowTab (on a Tabbed dialog window)
Send("^+{TAB}")
Navigate to previous WindowTab.
Send("{SPACE}")
Can be used to toggle a checkbox or click a button.
Send("{+}")
Usually checks a checkbox (if it's a "real" checkbox.)
Send("{-}")
Usually unchecks a checkbox.
Send("{NumPadMult}")
Recursively expands folders in a
SysTreeView32.
Use Alt-key combos to access menu
items. Also, open Notepad and try the following:
Send("!f") Send Alt+f, the access
key for Notepad's file menu. Try other letters!
Send("{DOWN}")
Move down a menu.
Send("{UP}")
Move up a menu.
Send("{LEFT}")
Move leftward to new menu or expand a submenu.
Send("{RIGHT}")
Move rightward to new menu or collapse a submenu.
See Windows' Help--press Win+F1--for a complete list
of keyboard shortcuts if you don't know the importance of Alt+F4, PrintScreen,
Ctrl+C, and so on.
When running a script on a remote computer through a
program as psexec (https://autoit.de/www.sysinternals.com) or beyondexec (https://autoit.de/www.beyondlogic.org) it
is necessary, specially when sending strokes to a program launch by the script
with a Run function, to use ControlSend or other ControlXXX functions to
directly communicate with the control. Send even with Opt("SendAttachMode",1) is not
working.
Using the -s mode when submitting can help to have better right on
the remote computer.
Opt("SendKeyDelay",...) alters the the length of the
brief pause in between sent keystrokes.
Opt("SendKeyDownDelay",...) alters
the length of time a key is held down before being released during a
keystroke.
moin,
ich möchte gerne auf den tasten druck warten, wie geht das wohl ...?
danke