Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM Virgin.
#1
Just started to use QM, enjoying this powerfull software, but I'm a complete noob and in dire need of advices Sad.
At this point already got how to record actions & modify it after to taste my needs with sleeps & coordinate changes.

First question I'm struggling with - how to make macros copy-pasting things from one window to another not to affect mouse movement? Atm I'm watching at it working, if I press any button or move mouse, work will be broken.
Tried to use it in Virtual Box - sometimes it works correctly, if I'm quick to alt-tab, seems like it doesn't need mouse to work properly, sometimes it fails in process. What I aiming at - making myself able to keep working during macros doing copy-paste work on two opened windows.

Example of code:
Code:
Copy      Help
# Stage 1
int w1=act(win Notepad)
1 ; sleep
dou 144 62 w1 1
'Cc
int w2=act(win Notepad2)
1 ; sleep
lef 256 1429 w2 1
'Cv

Second question - how to make macros auto-launching on exact window opening? I tried to figure different trigger types - found only keyboard launching, so to make three-steps copy-paste work I press alt+1, 2, 3.. Any possible way to make macros auto-launch on opening, for example, Notepad3?

Third question - chain brakes. Sometimes, rarely, wait timeouts don't work as intended and chain breaks on half-way, and restarting whole process is frustrating and time-consuming. Is there any way to make macros continue working no matter what, even if there was some error during the process?

Thanks for any answers or attention.
#2
1. A human and an automation program cannot simultaneously use keyboard/mouse on the same computer, unless the macro runs on a virtual PC like Virtual Box or Vmware Player. If the macro fails on Virtual Box, it would probably fail on host computer too; need to change something in the macro.

There are functions that can automate background windows without using keyboard/mouse. Look in floating toolbar -> Window/control -> Accessible object. Not so easy to use.

2. Use a window trigger.

3. To make macro continue on error, insert this at the beginning:
opt err 1
But in most cases the macro then will do bad things on error. Use the 'opt err 1' carefully.
To avoid errors caused by a too short wait time, use 'wait for' functions, for example 'wait for window', with bigger timeout.
Currently there are no better choices. Future Quick Macros versions should have an option like this: on error pause macro and ask the user what to do (wait more etc), maybe even to edit&continue macro without ending it.
#3
Question:
How to use the net function to run a macro on a guest virtual PC (Virtual Box or Vmware Player) from a macro that runs on host PC.

1. On guest PC: Install Quick Macros (QM).

2. On guest PC: In QM Options -> Network check the first check box and type a password next to it. Also copy the computer name that is displayed below; will need it in step 4. Click OK or Apply. Allow Quick Macros in the Windows Firewall dialog.

3. On guest PC: Create a macro for testing.
Macro Macro on guest PC
Code:
Copy      Help
out "success"

4. On host PC: Create this macro for testing.
Macro Macro on host PC
Code:
Copy      Help
int result=net("GUEST-NAME" "PASSWORD" "Macro on guest PC")
if(result) end F"<help>net</help> failed, result={result}"
Here GUEST-NAME is guest PC name (you can see/copy it in step 2).
Here PASSWORD is the password from step 2.
And the third argument is the macro name on guest PC.

5. Run this macro on host PC. Look in QM output on guest PC, it should display "success".

If error:
Make sure that you can access the guest PC from host PC in Windows Explorer -> Network. For example I can access it when using Vmware Player, but cannot access when using Virtual Box.


Forum Jump:


Users browsing this thread: 1 Guest(s)