
CzarnyKhaki
Active Members-
Posts
38 -
Joined
-
Last visited
Everything posted by CzarnyKhaki
-
Replying to this topic instead making new one, I'd like to ask you: How to wait untill the window with permanent removing files disappears (and than continue the loop)? I don't know if it's related with DirectUIHWND or more with msctls_progress32 or anything. Can you give me the exact code fragment to paste?
-
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
oh, one more thing: Can you suggest me some way to stop all currently commands when new command is ordered (new button pressed before previous function was finished)? -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
The topic can be closed. Thanks, everyone, I'll give ya likes. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
I added ClipPut("") after the date part and now everything goes as supposed! Works! No errors! Code (I censored name of company) is: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\a*****a_ico_QiO_icon.ico #AutoIt3Wrapper_Compression=0 #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Date.au3> #include <Constants.au3> HotKeySet("{ESC}", "_Exit") HotKeySet("{F1}", "_Przygotowanie") HotKeySet("{F2}", "_Fax") HotKeySet("{F3}", "_Odmowa") HotKeySet("{F4}", "_Pomylka") HotKeySet("{F5}", "_NiePracuje") HotKeySet("{F6}", "_Przelozenie") HotKeySet("{F7}", "_MialSpotkanie") HotKeySet("{F8}", "_MaPolise") HotKeySet("{F9}", "_NieUbezpieczaSie") HotKeySet("{F10}", "_OlewaNN") HotKeySet("{F11}", "_RODO") HotKeySet("{End}", "_BrakCzasu") HotKeySet("{Home}", "_UmawiaSie") HotKeySet("{PAUSE}", "_TogglePause") Global $g_bPaused = False MsgBox(64, "AUTOKONSULTANT A****A", "Najpierw się zaloguj i wybierz kampanię. Następnie wciśnij klawisz F1.") While 1 Sleep(4) WEnd ;ESC Func _Exit() Exit EndFunc ;==>_Exit ;F1 Func _Przygotowanie() ToolTip("TRWA PRZYGOTOWANIE PROGRAMU", 0, 0) MouseClickDrag ( "left", 241, 240, 49, 15, 1) ; (1 is speed) MouseClickDrag ( "left", 896, 531, 747, 980, 1) ; (1 is speed) MouseClickDrag ( "left", 739, 972, 745, 979, 1) ; (1 is speed) MouseMove (627, 44) ConsoleWrite('Fax() -> MouseMove (627, 44)' & @CRLF) MouseClick ("left") MouseMove (634, 570) MouseClick ("left") Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) WinMove($hWnd, "", 755, 742, 528, 242) ClipPut ("AUTOKONSULTANT") Send ("^v{ENTER}") ClipPut ("Funkcje (klawisze na klawiaturze):") Send ("^v{ENTER}") ClipPut ("F1 = Przygotowanie Autokonsultanta do pracy") Send ("^v{ENTER}") ClipPut ("F2 = Poczta głosowa F3 = Odmowa rozmowy") Send ("^v{ENTER}") ClipPut ("F4 = Pomyłka F5 = Brak dochodu") Send ("^v{ENTER}") ClipPut ("F6 = Przełożenie na za tydzień F7 = Jest po spotkaniu") Send ("^v{ENTER}") ClipPut ("F8 = Ma polisę F9 = Nie ubezpiecza się") Send ("^v{ENTER}") ClipPut ("F10 = Brak zainteresowania marką NN F11 = Brak zgody RODO") Send ("^v{ENTER}") ClipPut ("End = Brak czasu na spotkanie") Send ("^v{ENTER}") ClipPut (" Home = Umawia się") Send ("^v{ENTER}") ClipPut("Pause|Break = Pauza Autokonsultanta") Send ("^v{ENTER}") ClipPut (" ESC = Zamknięcie Autokonsultanta") Send ("^v") ClipPut ("") MouseMove (634, 570) ToolTip("GOTOWE!", 658, 578) Sleep(1600) ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przygotowanie ;PAUSE Func _TogglePause() $g_bPaused = Not $g_bPaused While $g_bPaused Sleep(4) ToolTip("AUTOKONSULTANT A****A ZAPAUZOWANY. WCINIŚNIJ Pause|Break ABY ODPAUZOWAĆ", 0, 0) WEnd ToolTip("", 0, 0) EndFunc ;==>_TogglePause ;F2 Func _Fax() ToolTip("POCZTA GŁOSOWA", 0, 0) MouseMove (25, 76) MouseClick ("left") Sleep(140) MouseMove (179, 477) Sleep(260) MouseClick ("left") MouseMove (229, 812) Sleep(260) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Fax ;F3 Func _Odmowa() ToolTip("ODMOWA ROZMOWY", 0, 0) MouseMove (25, 76) MouseClick ("left") Sleep(240) MouseMove (179, 708) Sleep(260) MouseClick ("left") MouseMove (226, 811) Sleep(260) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Odmowa ;F4 Func _Pomylka() ToolTip("POMYŁKA", 0, 0) MouseMove (25, 76) MouseClick ("left") Sleep(240) MouseMove (180, 611) MouseClick ("left") MouseMove (229, 812) Sleep(260) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Pomylka ;F5 Func _NiePracuje() ToolTip("NIE MA STAŁEGO ŹRÓDŁA DOCHODU", 0, 0) MouseMove (166, 550) MouseClick ("left") MouseMove (241, 600) MouseClick ("left") Sleep(1340) MouseMove (175, 573) MouseClick ("left") MouseMove (266, 948) MouseClick ("left") Sleep(900) MouseClick ("left") MouseMove (265, 923) MouseClick ("left") MouseMove (197, 467) Sleep(900) MouseClick ("left") MouseMove (223, 520) MouseClick ("left") Sleep(1200) MouseMove (173, 493) MouseClick ("left") MouseMove (213, 548) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Niepracuje ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA ZA TYDZIEŃ PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) ClipPut("") MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Sleep(10) Send ("^c") ; copy field in clipboard Sleep(10) ConsoleWrite('date() -> Send ("^c")' & @CRLF) $sDateField = ClipGet () ; retrieve date string ConsoleWrite('date() -> $sDateField = ClipGet () => ' & $sDateField & @CRLF) $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD ConsoleWrite('date() -> $sDateField = StringReplace ($sDateField, "-", "/")' & $sDateField & @CRLF) $sNewDate = _DateAdd ("D", 7, $sDateField) ; add 7 days If @error Then ConsoleWrite("ERROR: _DateAdd() failed. @error = " & @error & @CRLF) ConsoleWrite("ERROR: $sDateField = " & $sDateField & @CRLF) Exit -1 EndIf ConsoleWrite('date() -> $sNewDate = _DateAdd ("D", 1, $sDateField)' & $sDateField & @CRLF) $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ConsoleWrite('date() -> $sNewDate = StringReplace ($sNewDate, "/", "-")' & $sNewDate & @CRLF) ClipPut($sNewDate) ConsoleWrite('date() -> ClipPut($sNewDate)' & $sNewDate & @CRLF) Sleep(10) Send ("^v") ; paste field ClipPut("") ConsoleWrite('date() -> Send ("^v")' & @CRLF) Sleep(10) MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 55, 1)) ClipPut($sRandomTime) Sleep(10) Send ("^v") ; paste hour Sleep(10) ClipPut("") MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(2) MouseMove (245, 867) Sleep(1000) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie ;F7 Func _MialSpotkanie() ToolTip("JEST PO SPOTKANIU Z PRZEDSTAWICIELEM", 0, 0) MouseMove (167, 550) MouseClick ("left") MouseMove (266, 602) MouseClick ("left") Sleep(1450) MouseMove (176, 709) ;klik na "miał kontakt" MouseClick ("left") Sleep(250) MouseMove (262, 948) MouseClick ("left") Sleep(450) MouseMove (176, 466) MouseClick ("left") Sleep(1050) MouseMove (299, 522) MouseClick ("left") Sleep(1250) MouseMove (172, 494) MouseClick ("left") MouseMove (274, 547) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_MialSpotkanie ;F8 Func _MaPolise() ToolTip("JUŻ MA UBEZPIECZENIE", 0, 0) MouseMove (167, 548) MouseClick ("left") MouseMove (311, 604) MouseClick ("left") Sleep(1460) MouseMove (176, 763) MouseClick ("left") MouseMove (265, 948) MouseClick ("left") Sleep(990) MouseMove (177, 465) Sleep(1050) MouseClick ("left") MouseMove (236, 516) MouseClick ("left") MouseMove (172, 493) Sleep(1260) MouseClick ("left") MouseMove (226, 549) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_MaPolise ;F9 Func _NieUbezpieczaSie() ToolTip("NIGDZIE SIĘ NIE UBEZPIECZA", 0, 0) MouseMove (168, 549) MouseClick ("left") MouseMove (245, 600) MouseClick ("left") Sleep(1360) MouseMove (176, 735) MouseClick ("left") MouseMove (279, 947) MouseClick ("left") Sleep(1000) MouseMove (177, 466) MouseClick ("left") MouseMove (289, 521) MouseClick ("left") Sleep(1260) MouseMove (172, 494) MouseClick ("left") MouseMove (237, 548) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_NieUbezpieczaSie ;F10 Func _OlewaNN() ToolTip("BRAK ZAINTERESOWANIA MARKĄ NN", 0, 0) MouseMove (260, 551) MouseClick ("left") MouseMove (260, 603) MouseClick ("left") Sleep(1450) MouseMove (242, 629) MouseClick ("left") Sleep(100) MouseMove (279, 945) MouseClick ("left") Sleep(1000) MouseMove (203, 466) MouseClick ("left") MouseMove (254, 521) MouseClick ("left") MouseMove (172, 493) Sleep(1260) MouseClick ("left") MouseMove (249, 549) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_OlewaNN ;F11 Func _RODO() ToolTip("BRAK ZGODY NA PRZETWARZANIE DANYCH OSOBOWYCH", 0, 0) MouseMove (167, 550) MouseClick ("left") MouseMove (233, 600) MouseClick ("left") Sleep(1350) MouseMove (177, 789) MouseClick ("left") MouseMove (300, 950) MouseClick ("left") Sleep(1000) MouseMove (176, 464) MouseClick ("left") MouseMove (290, 522) MouseClick ("left") Sleep(1350) MouseMove (174, 493) MouseClick ("left") MouseMove (180, 550) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_RODO ;End Func _BrakCzasu() ToolTip("BRAK CZASU NA SPOTKANIE W CZASIE TRWANIA AKCJI", 0, 0) MouseMove (166, 550) MouseClick ("left") MouseMove (241, 600) MouseClick ("left") Sleep(1360) MouseMove (175, 547) MouseClick ("left") MouseMove (280, 952) MouseClick ("left") Sleep(1000) MouseMove (176, 466) MouseClick ("left") MouseMove (255, 520) MouseClick ("left") Sleep(1360) MouseMove (174, 494) MouseClick ("left") MouseMove (210, 552) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_BrakCzasu ;Home Func _UmawiaSie() ToolTip("ZAINTERESOWANIE SPOTKANIEM", 0, 0) MouseMove (170, 495) MouseClick ("left") MouseMove (267, 605) MouseClick ("left") Sleep(1350) MouseMove (175, 565) MouseClick ("left") MouseMove (270, 670) MouseClick ("left") Sleep(900) MouseMove (175, 646) MouseClick ("left") MouseMove (259, 728) MouseClick ("left") Sleep(900) MouseMove (175, 646) MouseClick ("left") MouseMove (280, 725) MouseClick ("left") Sleep(900) MouseMove (175, 488) MouseClick ("left") MouseMove (280, 570) MouseClick ("left") Sleep(900) MouseMove (175, 550) MouseClick ("left") MouseMove (275, 683) MouseClick ("left") Sleep(900) MouseMove (740, 514) MouseClickDrag ( "left", 740, 514, 740, 712, 1) MouseMove (175, 785) MouseClick ("left") MouseMove (267, 864) MouseClick ("left") ToolTip("KLIKAJ DALEJ JUŻ SAMODZIELNIE", 185, 597) MouseMove (176, 587) Sleep(4250) ToolTip("", 0, 0) EndFunc ;==>_UmawiaSie hmm.. There is something deeper about that, because now even the previous unworking code works correctly. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
few posts ago I pasted the debug message which was saying that it gets the correct changed date in clipboard when hour part is disabled, and when it is enabled, it gets 0 instead, and everything else is the same I will try that what you gave above when I will be back at work But there is definitelly something in that hour part what is disliked by date part. It works fine untill the hour part take action. After this happens, next procedure of changing date is failed. Scheme1: run script with Hour part ENABLED client 1 date correctly changed ConsoleWrite informs that it took the correctly changed date to clipboard hour correctly changed client2 date change FAILS ConsoleWrite informs that it took "0" to clipboard hour correctly changed can't set status automatically, manually needed client3 same as client 2 Scheme2: run script with Hour part DISABLED client 1 date correctly changed ConsoleWrite informs that it took the correctly changed date to clipboard client2 date correctly changed ConsoleWrite informs that it took the correctly changed date to clipboard client3 same as client 2 I'll let you know if it tells more with what you posted above -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
Stop suggesting that it is not highlighted, please. It works when I disable hours. Where does this "0" come from??? this is causing problems: ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA ZA TYDZIEŃ PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) ClipPut("") MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Sleep(10) Send ("^c") ; copy field in clipboard Sleep(10) ConsoleWrite('date() -> Send ("^c")' & @CRLF) $sDateField = ClipGet () ; retrieve date string ConsoleWrite('date() -> $sDateField = ClipGet () => ' & $sDateField & @CRLF) $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD ConsoleWrite('date() -> $sDateField = StringReplace ($sDateField, "-", "/")' & $sDateField & @CRLF) $sNewDate = _DateAdd ("D", 7, $sDateField) ; add 7 days ConsoleWrite('date() -> $sNewDate = _DateAdd ("D", 1, $sDateField)' & $sDateField & @CRLF) $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ConsoleWrite('date() -> $sNewDate = StringReplace ($sNewDate, "/", "-")' & $sNewDate & @CRLF) ClipPut($sNewDate) ConsoleWrite('date() -> ClipPut($sNewDate)' & $sNewDate & @CRLF) Sleep(10) Send ("^v") ; paste field ConsoleWrite('date() -> Send ("^v")' & @CRLF) Sleep(10) MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 55, 1)) ClipPut($sRandomTime) Sleep(10) Send ("^v") ; paste hour Sleep(10) ClipPut("") MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(2) MouseMove (245, 867) Sleep(1000) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie while this works without problems: ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA ZA TYDZIEŃ PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) ClipPut("") MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Sleep(10) Send ("^c") ; copy field in clipboard Sleep(10) ConsoleWrite('date() -> Send ("^c")' & @CRLF) $sDateField = ClipGet () ; retrieve date string ConsoleWrite('date() -> $sDateField = ClipGet () => ' & $sDateField & @CRLF) $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD ConsoleWrite('date() -> $sDateField = StringReplace ($sDateField, "-", "/")' & $sDateField & @CRLF) $sNewDate = _DateAdd ("D", 7, $sDateField) ; add 7 days ConsoleWrite('date() -> $sNewDate = _DateAdd ("D", 1, $sDateField)' & $sDateField & @CRLF) $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ConsoleWrite('date() -> $sNewDate = StringReplace ($sNewDate, "/", "-")' & $sNewDate & @CRLF) ClipPut($sNewDate) ConsoleWrite('date() -> ClipPut($sNewDate)' & $sNewDate & @CRLF) Sleep(10) Send ("^v") ; paste field ConsoleWrite('date() -> Send ("^v")' & @CRLF) ;Sleep(10) ;MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) ;Local $sRandomTime ;$sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 55, 1)) ;ClipPut($sRandomTime) ;Sleep(10) ;Send ("^v") ; paste hour ;Sleep(10) ;ClipPut("") MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(2) MouseMove (245, 867) Sleep(1000) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie Editing date fails only when I enable the hour part... -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
can AutoIt anyhow clear the clipboard after procedure is finished? -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
Please give me some solution what can I do in this situation. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
Thanks, it worked perfectly after I changed the order, as you suggested. Any ideas why did that happen? edit: It started to paste "0" again! ;( And I don't know what causes that! The field is definitelly highlighted and than is replaced with "0" ;/ edit: I closed the script [Esc], opened again and it pastes date correctly now o_O edit: it works fine once after opening script, and than when using the command second time, it crashes placing "0" instead modified date. Closing script and opening again solves the problem, but just for 1 time. I guess it hates when I have modified hour and didn't close the script before operating on date for next client. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
(hour disabled) ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA JUTRO PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) MouseMove (226, 811) MouseClick ("left") ;MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) ;Local $sRandomTime ;$sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 56, 1)) ;$sHourField = $sRandomTime ;ClipPut($sRandomTime) ;Send ("^v") ; paste hour MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard ConsoleWrite('date() -> Send ("^c")' & @CRLF) $sDateField = ClipGet () ; retrieve date string ConsoleWrite('date() -> $sDateField = ClipGet () => ' & $sDateField & @CRLF) $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD ConsoleWrite('date() -> $sDateField = StringReplace ($sDateField, "-", "/")' & $sDateField & @CRLF) $sNewDate = _DateAdd ("D", 1, $sDateField) ; add one day ConsoleWrite('date() -> $sNewDate = _DateAdd ("D", 1, $sDateField)' & $sDateField & @CRLF) $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ConsoleWrite('date() -> $sNewDate = StringReplace ($sNewDate, "/", "-")' & $sNewDate & @CRLF) ClipPut($sNewDate) ConsoleWrite('date() -> ClipPut($sNewDate)' & $sNewDate & @CRLF) Send ("^v") ; paste field ConsoleWrite('date() -> Send ("^v")' & @CRLF) MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(560) MouseMove (245, 867) Sleep(560) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
It works fine when I disable the part with hour. It is definitelly highlighted. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
help about this function is totally unclear for me... ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA JUTRO PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) MouseMove (226, 811) MouseClick ("left") MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 56, 1)) $sHourField = $sRandomTime ClipPut($sRandomTime) Send ("^v") ; paste hour MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard ConsoleWrite('date() -> Send ("^c")' & @CRLF) $sDateField = ClipGet () ; retrieve date string ConsoleWrite('date() -> $sDateField = ClipGet () => ' & $sDateField & @CRLF) $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD ConsoleWrite('date() -> $sDateField = StringReplace ($sDateField, "-", "/")' & $sDateField & @CRLF) $sNewDate = _DateAdd ("D", 1, $sDateField) ; add one day ConsoleWrite('date() -> $sNewDate = _DateAdd ("D", 1, $sDateField)' & $sDateField & @CRLF) $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ConsoleWrite('date() -> $sNewDate = StringReplace ($sNewDate, "/", "-")' & $sNewDate & @CRLF) ClipPut($sNewDate) ConsoleWrite('date() -> ClipPut($sNewDate)' & $sNewDate & @CRLF) Send ("^v") ; paste field ConsoleWrite('date() -> Send ("^v")' & @CRLF) MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(560) MouseMove (245, 867) Sleep(560) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
I guess because I don't need to manipulate anything present in clipboard. ___ Is anywhere better explanation of ConsoleWrite? The help about this function sux -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA JUTRO PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) MouseMove (226, 811) MouseClick ("left") MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) $sHourField = ClipGet () ; retrieve hour string Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 56, 1)) $sHourField = $sRandomTime ClipPut($sRandomTime) Send ("^v") ; paste hour MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard ConsoleWrite('date() -> Send ("^c")' & @CRLF) $sDateField = ClipGet () ; retrieve date string ConsoleWrite('date() -> $sDateField = ClipGet ()' & @CRLF) $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD ConsoleWrite('date() -> $sDateField = StringReplace ($sDateField, "-", "/")' & @CRLF) $sNewDate = _DateAdd ("D", 1, $sDateField) ; add one day ConsoleWrite('date() -> $sNewDate = _DateAdd ("D", 1, $sDateField)' & @CRLF) $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ConsoleWrite('date() -> $sNewDate = StringReplace ($sNewDate, "/", "-")' & @CRLF) ClipPut($sNewDate) ConsoleWrite('date() -> ClipPut($sNewDate)' & @CRLF) Send ("^v") ; paste field ConsoleWrite('date() -> Send ("^v")' & @CRLF) MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(560) MouseMove (245, 867) Sleep(560) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie >"C:\Users\agent01\Downloads\autoit-v3\install\SciTe\..\autoit3.exe" /ErrorStdOut "C:\Users\agent01\Downloads\autoit-v3\install\Examples\aukon2.au3" date() -> Send ("^c") date() -> $sDateField = ClipGet () date() -> $sDateField = StringReplace ($sDateField, "-", "/") date() -> $sNewDate = _DateAdd ("D", 1, $sDateField) date() -> $sNewDate = StringReplace ($sNewDate, "/", "-") date() -> ClipPut($sNewDate) date() -> Send ("^v") >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 23.69 -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
how can I see the result of console? -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
ok I removed the line. Now, the thing is, that when I disable the hour part, the date is working well, but when I enable the hour part, it writes "0" in date, and the hour works well. ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA JUTRO PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) MouseMove (226, 811) MouseClick ("left") MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) Send ("{Delete}") ; $sHourField = ClipGet () ; retrieve hour string Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 56, 1)) $sHourField = $sRandomTime ClipPut($sRandomTime) Send ("^v") ; paste hour MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard $sDateField = ClipGet () ; retrieve date string $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD $sNewDate = _DateAdd ("D", 1, $sDateField) ; add one day $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ClipPut($sNewDate) Send ("^v") ; paste field MouseMove (590, 871) MouseClick ("left") Send("{Enter}") MouseMove (167, 809) MouseClick ("left") Sleep(560) MouseMove (245, 867) Sleep(560) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
it does highlight -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
Cool. I have it now partially working. The date is replaced correctly with hour element disabled, but with the hour element enabled it is all not working. Where is the mistake? ;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA JUTRO PO 17:00", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(540) MouseMove (296, 506) MouseClick ("left") Sleep(540) MouseMove (226, 811) MouseClick ("left") MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard $sHourField = ClipGet () ; retrieve hour string Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 56, 1)) $sRandomTime = ClipGet () ; retrieve hour string ClipPut($sRandomTime) Send ("^v") ; paste hour MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard $sDateField = ClipGet () ; retrieve date string $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD $sNewDate = _DateAdd ("D", 1, $sDateField) ; add one day $sNewDate = StringReplace ($sNewDate, "/", "-") ; replacing strings back ClipPut($sNewDate) Send ("^v") ; paste field MouseMove (590, 871) MouseClick ("left") MouseMove (167, 809) MouseClick ("left") Sleep(560) MouseMove (245, 867) Sleep(560) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_Przelozenie -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
-
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
when I search for these things help gives me completely different results, I don't get it... For example, when I search for "Send" it gives me "SciTE-LUA Interface" index result, and "SciTE Director Interface" search result. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
;( it's black magic for me "look under at the functions that I used" Do you mean me to search for: Local, StringFormat, Random, Send, ClipGet, StringReplace, _DateAdd; MsgBox, MB_SYSTEMMODAL? after reading the results will it be clear to me how to insert hour and date in box? -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
Ok, help there works. but omg... I'm afraid I'm gonna be fired from work if I waste 20-50 more hours on writing this script and I see I have whole book to read before I know where to start lerning. I searched "_ArrayDisplay" (it gives result "AU3Recorder") and "Display on Array" (it gives result "CodeWizard") and didn't find anything helpful there. Please give me a list of things I should read to insert the prepared as above hour and date in window. Edit: And why dahell is that F12 not working? HotKeySet("{F12}", "_BrakCzasu") ;F12 Func _BrakCzasu() ToolTip("BRAK CZASU NA SPOTKANIE W CZASIE TRWANIA AKCJI", 0, 0) MouseMove (166, 550) MouseClick ("left") MouseMove (241, 600) MouseClick ("left") ToolTip("", 0, 0) MouseMove (600, 520) EndFunc ;==>_BrakCzasu -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
I don't have any file named AutoIt.chm, but AutoIt.chw (unknown file format). I open the SciTE, go to Help menu > Help and nothing is opened. -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
I can't take it home, because I can program it only while I have access to the program at work. Can you at least tell me what should I search for in the help file? By the way, help file is not working for me: I search for topics or index and click "Show" after choosing one and it shows me nothing so I use www help: https://www.autoitscript.com/autoit3/docs/functions.htm -
Move mouse and click script
CzarnyKhaki replied to CzarnyKhaki's topic in AutoIt General Help and Support
;F6 Func _Przelozenie() ToolTip("PRZEŁOŻENIE ROZMOWY NA JUTRO", 0, 0) MouseMove (98, 76) MouseClick ("left") Sleep(440) MouseMove (296, 506) MouseClick ("left") Sleep(390) MouseMove (226, 811) MouseClick ("left") MouseClickDrag ( "left", 462, 465, 409, 461, 2) ; (2 is speed) Local $sRandomTime $sRandomTime = StringFormat("%02i:%02i", Random(17, 19, 1) , Random(0, 56, 1)) MouseClickDrag ( "left", 335, 465, 238, 460, 2) ; (2 is speed) Send ("^c") ; copy field in clipboard $sDateField = ClipGet () ; retrieve date string $sDateField = StringReplace ($sDateField, "-", "/") ; field must be formatted YYYY/MM/DD $sNewDate = _DateAdd ("D", 1, $sDateField) ; add one day MsgBox ($MB_SYSTEMMODAL,"",$sNewDate) MouseMove (590, 871) MouseClick ("left") MouseMove (167, 809) MouseClick ("left") Sleep(260) MouseMove (245, 867) Sleep(260) MouseClick ("left") ToolTip("", 0, 0) EndFunc ;==>_Przelozenie Text is correctly highlited but it doesn't react as suposed. After highliting the hour it doesn't do anything with it, at next it highlights the date and all it does is just showing this window, and it doesn't change the date, it just continues further.