Jump to content

[Ask] Script From Quick Macro to Autoit


Recommended Posts

I have a script from Quick Macro. I was wondering if it could be turned into a script that works for autoit. It's simple but I think it only works in that program. I hope I'm wrong.

This is what a part of it looks like it.

Script From Quick Macro

MoveTo 325,251 <<< Coordinat Mouse
LeftClick 1 <<< Mouse Left Click down
Delay 300 
LeftUp 1 <<< Mouse Left Clik Up
Delay 10000 
KeyDown 13,1 <<< Enter Down
Delay 200 
KeyUp 13,1 <<< Enter Up
Delay 200
KeyDown 13,1 <<< Enter Down
Delay 200
KeyUp 13,1 <<< Enter Up

So, could it be done or not be done?

Edited by tjiuz
Link to comment
Share on other sites

I have a script from Quick Macro. I was wondering if it could be turned into a script that works for autoit. It's simple but I think it only works in that program. I hope I'm wrong.

This is what a part of it looks like it.

Script From Quick Macro

MoveTo 325,251 <<< Coordinat Mouse
LeftClick 1 <<< Mouse Left Click down
Delay 300 
LeftUp 1 <<< Mouse Left Clik Up
Delay 10000 
KeyDown 13,1 <<< Enter Down
Delay 200 
KeyUp 13,1 <<< Enter Up
Delay 200
KeyDown 13,1 <<< Enter Down
Delay 200
KeyUp 13,1 <<< Enter Up

So, could it be done or not be done?

In short . . . yes!

WelCome to the forum.

If you did install AI take a look at these and their examples from the help section of scite:

MouseMove
MouseClick
Send

Spelling!

Edited by JoHanatCent
Link to comment
Share on other sites

In short . . . yes!

WelCome to the forum.

If you did install AI take a look at these and their examples from the help section of scite:

MouseMove
MouseClick
Send

Spelling!

I've installed the AI​​.

could be done.

how ?

help in the correction

While 1=1
$moveX = random (1,325,1)
$moveY = random (1,251,1)
MouseClick("left",$moveX,moveY,1,1)
Sleep (10000)
send ("{enter}")
sleep (200)
send ("{enter}")
sleep (200)
send ("{enter}")
sleep (200)
WEnd

there is an error line-4

error : error parsing function call

Thanks B4

Link to comment
Share on other sites

moveY = $moveY

thanks for the help .. now can build .. ^ ^

but why the movement of the mouse is not in accordance with 325.251?

mouse cursor moves randomly>, <!

I want to ask now is how to use hotkey to turn on and off the script is running?

Edited by tjiuz
Link to comment
Share on other sites

You will need The function HotKeySet() and declare a function for the hotkey you chose.

Something like this.

HotKeySet("{F2}","_pause")
global $pause = false

; Your code here

Func _pause()
    $pause = Not $pause
    While $pause
        Sleep(500)
    WEnd
EndFunc   ;==>_pause

it's only for a command script pause?

what if making masagebox to the initial view (insert name in the credits and there massagebox OK button to close the massagebox) when the program is enabled script?

I saw in the FAQ like this

; A simple custom messagebox that uses the MessageLoop mode
#include <GUIConstantsEx.au3>
 
GUICreate("Custom Msgbox", 210, 80)
 
GUICtrlCreateLabel("Please click a button!", 10, 10)
$YesID = GUICtrlCreateButton("Yes", 10, 50, 50, 20)
$NoID = GUICtrlCreateButton("No", 80, 50, 50, 20)
$ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20)
 
; Set accelerators for Ctrl+y and Ctrl+n
Dim $AccelKeys[2][2]=[["^y", $YesID], ["^n", $NoID]]
GUISetAccelerators($AccelKeys)
 
GUISetState(); display the GUI
 
Do
    $msg = GUIGetMsg()
 
    Select
        Case $msg = $YesID
            MsgBox(0, "You clicked on", "Yes")
        Case $msg = $NoID
            MsgBox(0, "You clicked on", "No")
        Case $msg = $ExitID
            MsgBox(0, "You clicked on", "Exit")
        Case $msg = $GUI_EVENT_CLOSE
            MsgBox(0, "You clicked on", "Close")
    EndSelect
Until $msg = $GUI_EVENT_CLOSE Or $msg = $ExitID

masagebox but it can not close its macros and script was still running when there is massagebox ..

Edited by tjiuz
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...