Jump to content
Beauipc

Mouse draw / Signing a form

Recommended Posts

Beauipc

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

 

 

Share this post


Link to post
Share on other sites
Melba23

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Beauipc

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

 

Share this post


Link to post
Share on other sites
Beauipc

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. 

Share this post


Link to post
Share on other sites
Melba23

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Beauipc

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. 

Share this post


Link to post
Share on other sites
Melba23

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.