Musashi 67 Posted November 7 (edited) 31 minutes ago, CzarnyKhaki said: For example, when I search for "Send" it gives me "SciTE-LUA Interface" Place the cursor on the command/function you want to search for. Then press F1. This is a help, and besides, an excellent one, not a book. Edited November 7 by Musashi Hide Musashi's signature Hide all signatures "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Share this post Link to post Share on other sites
Musashi 67 Posted November 7 2 hours ago, CzarnyKhaki said: Edit: And why dahell is that F12 not working? See Help : HotKeySet The following hotkeys cannot be set: ASC nnnn Cannot be used as in Send(). It will use "A" first char as Send() does when the "{...}" is invalid. Ctrl+Alt+Delete It is reserved by Windows F12 It is also reserved by Windows, according to its API. NumPad's Enter Key Instead, use {Enter} which captures both Enter keys on the keyboard. Win+B,D,E,F,L,M,R,U; and Win+Shift+M These are built-in Windows shortcuts. Note: Win+B and Win+L might only be reserved on Windows XP and above. Alt, Ctrl, Shift, Win These are the modifier keys themselves! Other Any global hotkeys a user has defined using third-party software, any combos of two or more "base keys" such as '{F1}{F2}', and any keys of the form '{LALT}' or '{ALTDOWN}'. 1 CzarnyKhaki reacted to this Hide Musashi's signature Hide all signatures "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Share this post Link to post Share on other sites
Musashi 67 Posted November 7 (edited) On 11/6/2019 at 1:08 PM, Nine said: Open help file look under at the functions that I used. To the other members : "I would like to apologize for posting three replies in a row, but this might be useful for beginners ." @CzarnyKhaki : I haven't mentioned one variation to open the help yet. Move the cursor to the desired command or function in the source code below (i.e. StringReplace). #include <Date.au3> Const $x = 300, $y = 200 ; to be modify for position of the date field MouseClick ("left", $x, $y, 2, 1) ; double click the date field to highlight it 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) Now simply click on it or press right mouse button -> open new window or tab. Edited November 7 by Musashi 1 CzarnyKhaki reacted to this Hide Musashi's signature Hide all signatures "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 (edited) Quote "Place the cursor on the command/function you want to search for. Then press F1." nothing is happening, even after going to menu Help>Help(F1) nothing is shown Edited November 8 by CzarnyKhaki Share this post Link to post Share on other sites
Musashi 67 Posted November 8 22 minutes ago, CzarnyKhaki said: nothing is happening, You must have saved the script at least once, otherwise the mechanism won't work. 1 CzarnyKhaki reacted to this Hide Musashi's signature Hide all signatures "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 (edited) 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? expandcollapse popup;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 Edited November 8 by CzarnyKhaki Share this post Link to post Share on other sites
Nine 345 Posted November 8 2 hours ago, CzarnyKhaki said: Cool. I have it now partially working. 2 hours ago, CzarnyKhaki said: Where is the mistake? The fields MUST be highlighted (one after the other) for this to work...Not sure that the drag also highlights the field ? Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites
Nine 345 Posted November 8 hmmm, there is 2 clipget in hour part... 1 CzarnyKhaki reacted to this Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 (edited) 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. expandcollapse popup;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 Edited November 8 by CzarnyKhaki Share this post Link to post Share on other sites
Nine 345 Posted November 8 (edited) Now you need to learn how to debug a script. In the date part, insert after each line a ConsoleWrite that shows the current value of the variables you are manipulating. Run it and show us the result of the Scite console, along with the modified script... EDIT : what is that ? Send ("{Delete}") Edited November 8 by Nine 1 CzarnyKhaki reacted to this Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 how can I see the result of console? Share this post Link to post Share on other sites
Musashi 67 Posted November 8 3 minutes ago, CzarnyKhaki said: how can I see the result of console? The (SciTE-)console is the bottom window in the SciTE editor. 1 CzarnyKhaki reacted to this Hide Musashi's signature Hide all signatures "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 (edited) expandcollapse popup;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 Edited November 8 by CzarnyKhaki Share this post Link to post Share on other sites
Nine 345 Posted November 8 I meant look into the variables e.g. : ConsoleWrite('date() -> $sDateField = ClipGet () => ' & $sDateField & @CRLF) 1 CzarnyKhaki reacted to this Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites
Nine 345 Posted November 8 The clipget in the hour section is useless, do you know why ? 1 CzarnyKhaki reacted to this Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 (edited) 44 minutes ago, Nine said: The clipget in the hour section is useless, do you know why ? 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 Edited November 8 by CzarnyKhaki Share this post Link to post Share on other sites
Nine 345 Posted November 8 28 minutes ago, CzarnyKhaki said: Is anywhere better explanation of ConsoleWrite? Help file says it all. It is just a way to easily show informations about what going on in a script. It is mainly an easy way to debug... Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites
CzarnyKhaki 0 Posted November 8 (edited) help about this function is totally unclear for me... expandcollapse popup;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 Quote >"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, "/", "-")0 date() -> ClipPut($sNewDate)0 date() -> Send ("^v") Edited November 8 by CzarnyKhaki Share this post Link to post Share on other sites
Nine 345 Posted November 8 12 minutes ago, CzarnyKhaki said: date() -> Send ("^c") date() -> $sDateField = ClipGet () => It shows that the date field is not highlighted, at the moment of the copy... Hide Nine's signature Hide all signatures No signature so far... Share this post Link to post Share on other sites