Posts: 1
Threads: 1
Joined: Mar 2006
Is it possible to run a Quickmacro from the command line, if so what is the syntax?
Also is it possible to format the command in a way to allow my macro to accept a username and password? If so, how would I do that?
Regards,
Loopsluge
Posts: 1,769
Threads: 410
Joined: Feb 2003
look up "Command line parameters" in the help and that should answer all your questions on that part.
you can alway build a message box that will look at the two fields and if they don't match what you have programmed in the macro ends without executing.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Create new function, name it MsgBoxUserPassword, and paste this code using menu Edit -> Other Formats -> Paste Escaped.
Function MsgBoxUserPassword
;/
function# str&user str&password
;Shows a dialog where the user can input his user name and password.
;Returns 1 on OK, 0 on Cancel.
;On OK, stores user name and password in variables user and password.
;EXAMPLE
;str u p
;if(!MsgBoxUserPassword(u p)) ret
;out u
;out p
str controls = "3 4"
str e3 e4
if(!ShowDialog("MsgBoxUserPassword" 0 &controls)) ret
user=e3
password=e4
ret 1
;BEGIN DIALOG
;0 "" 0x90C80A46 0x100 0 0 205 73 "QM - user name and password"
;5 Static 0x54000000 0x0 4 10 48 12 "User name"
;3 Edit 0x54030080 0x200 56 10 142 14 ""
;6 Static 0x54000000 0x0 4 32 48 12 "Password"
;4 Edit 0x54030020 0x200 56 32 142 14 ""
;1 Button 0x54030001 0x4 56 58 48 14 "OK"
;2 Button 0x54030000 0x4 108 58 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2010801 "" ""
In macros, where you need input for user name and password, call this function like in the example.