Beauipc Posted June 17, 2016 Posted June 17, 2016 Hello All, I see the function to mouse click and drag. My question is how do I drag in a way that i am signing a form? doesn't have to be pretty, just function. Thanks
Moderators Melba23 Posted June 17, 2016 Moderators Posted June 17, 2016 Beauipc, Welcome to the AutoIt forums. Why exactly do you need to "sign" a form using a script? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Beauipc Posted June 17, 2016 Author Posted June 17, 2016 Melba23, Thank you for responding. I currently test software within mobile delivery devices. So imagine scanning a barcode handing package to customer then having them sign on the device itself. I have scripts in place to simulate pretty much everything except signing. I see the mouse click drag function and making attempts to test it. Any help would be appreciated. Thanks
Beauipc Posted June 17, 2016 Author Posted June 17, 2016 Func ScanTest() ;SendESC(); ;SlowSend("1"); ;Exit If Not WaitScreen("Main Menu") Then FailTest("Main Menu Not Detected") SlowSend("1");Scan Barcode If Not WaitScreen("Scan Barcode Blank Screen" ) Then FailTest("Scan Barcode Not Detected") SlowSend("rf000006096us") SlowSend("{Enter}") Sleep(1000) SlowSend("{Enter}") Sleep(2000) SlowSend("1") Sleep(1000) SlowSend("4") Sleep(2000) MouseClickDrag($MOUSE_CLICK_LEFT, 150, 200, 300, 400) Sleep(2000) MouseMove(10, 100) Sleep(2000) MouseClickDrag($MOUSE_CLICK_LEFT, 150, 200, 300, 400) SlowSend("1") Sleep(1000) SlowSend("1") Sleep(2000) SlowSend("{Enter}") If Not WaitScreen("Scan Barcode Blank Screen") then FailTest("Scan Barcode Not Detected!") PassTest("YES!") This is my code. under the MouseClickDrag($MOUSE_CLICK_LEFT, 150, 200, 300, 400) <-- is basically just draws a line which is fine for me. Thing is there is another field for address as well. I am trying to use the mouse move to reposition to the next field which is just below.
Moderators Melba23 Posted June 17, 2016 Moderators Posted June 17, 2016 Beauipc, There are a lot of commands in that snippet which are not native AutoIt (e.g. WaitScreen & SlowSend)- and the logic flow is suspect to put it mildly (e.g. how do you exit the function after a FailTest call?). Are you sure you have the right language forum? Quote MouseClickDrag(...) [...] basically just draws a line which is fine for me So why are you looking to refine this process? Understand that I am not at all happy with trying to script signatures - I see no reason to do so and plenty of reasons why we should not support it, M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Beauipc Posted June 17, 2016 Author Posted June 17, 2016 Melba23, My apologies for it seems giving you the wrong impression. I'm a QA Analyst for these devices and am simply automating my testing. All i wanted were lines created and not actual signatures just to complete my scripts nothing more. As i stated, it didnt have to look pretty or remotely come close to an actual signature. it just needed to function. I have already figured it out Thank you again for replying to this.
Moderators Melba23 Posted June 17, 2016 Moderators Posted June 17, 2016 Beauipc, It seems that we had a misunderstanding - glad to hear you got what you wanted. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now