Jump to content

Mouse draw / Signing a form


Recommended Posts

  • Moderators

Beauipc,

Welcome to the AutoIt forums.

Why exactly do you need to "sign" a form using a script?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • Moderators

Beauipc,

It seems that we had a misunderstanding - glad to hear you got what you wanted.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...