General Macro Scheduler discussion
Moderators: JRL, Dorian (MJT support)
-
xavior
- Newbie
- Posts: 7
- Joined: Thu May 13, 2010 6:26 pm
-
Contact:
Post
by xavior » Thu May 13, 2010 6:34 pm
Hello.
Currently i'm faceing a big problem with demo of Macro Sheduler.
Paste function
Code: Select all
Press CTRL
Send Character/Text>v
Release CTRL
Press Enter
is not working. Well it's working but once yes once no.
On my windows 7 (russian) all is ok
On my windows xp (rus) not working. and when i writting russian text by english letters it pasts me russian.
And sometimes when paste it sends like
i know this is some type of charset...
but how to make it correct?
P.S. i send text by
i get also bugs...
please help
-
adroege
- Automation Wizard
- Posts: 438
- Joined: Tue Dec 07, 2004 7:39 pm
Post
by adroege » Thu May 13, 2010 9:28 pm
Here is something to try instead of sending the key strokes to do paste.
[code]
GetClipBoard>result
Send>result
[/code]
-
xavior
- Newbie
- Posts: 7
- Joined: Thu May 13, 2010 6:26 pm
-
Contact:
Post
by xavior » Fri May 14, 2010 6:37 am
Have tested, this is working better, but also there is a problem. Russian text is sent in right way, but english is transcripted with numbers instead of text
Look next
-
adroege
- Automation Wizard
- Posts: 438
- Joined: Tue Dec 07, 2004 7:39 pm
Post
by adroege » Fri May 14, 2010 12:07 pm
At this point it doesn't seem like a Macro Scheduler issue, since the clipboard seems like it's the problem. I work exclusively in an English only environment, so mixed languages on the clipboard aren't something I have ever had to deal with.
Let's attack the problem in a different way.
Maybe the clipboard is not necessary to solve your problem.
What exactly are you trying to accomplish with Macro Scheduler? Maybe a completely different methodology can be used which doesn't use the clipboard.
-
xavior
- Newbie
- Posts: 7
- Joined: Thu May 13, 2010 6:26 pm
-
Contact:
Post
by xavior » Fri May 14, 2010 2:05 pm
i have written a simple script that moves mouse and then put the clipboard text into the window. window is flash program, i thought maybe problems with flash, but doing the same in notepad - not working too. probably some problems with my windows xp, need smth to install , but what..
-
xavior
- Newbie
- Posts: 7
- Joined: Thu May 13, 2010 6:26 pm
-
Contact:
Post
by xavior » Fri May 14, 2010 5:10 pm
have reinstalled windows xp - on english version
now
unrecognizable text (not working)
Code: Select all
Press CTRL
Send Character/Text>v
Release CTRL
Press Enter
seems to be working again on ENG XP
-
adroege
- Automation Wizard
- Posts: 438
- Joined: Tue Dec 07, 2004 7:39 pm
Post
by adroege » Fri May 14, 2010 6:53 pm
Maybe the problem lies in how you are getting the text into the clipboard in the first place?
How is text going to the clipboard?
*Another thought* - Do you have to use the clipboard?
Why not use other data storage techniques? Like read from file, read from memory components, read from database.... or use Macro Scheduler to prompt for the required information using a custom dialog or input box?
You can also use Macro Scheduler to put the text onto the clipboard if that is a very vital issue.
-
xavior
- Newbie
- Posts: 7
- Joined: Thu May 13, 2010 6:26 pm
-
Contact:
Post
by xavior » Sat May 15, 2010 4:58 am
before running macro shed. script i go to the notepad and copy text i need, and then program sends the same message during some perdiod of time, its the easiest way i think. As put text directly in macrosheduler make bugs with encoding
-
wvfrugalchick
- Newbie
- Posts: 15
- Joined: Sun Jul 23, 2023 4:57 pm
Post
by wvfrugalchick » Fri Mar 07, 2025 1:56 pm
I'm using the method suggested here:
GetClipBoard>result
Wait>0.5
Send>result
This works "most" of the time however there have been a few times it didnt copy correctly or something and actually sent the word "result" to the intended target. Is there a way to check the clipboard and if theres nothing there, abort?
Thanks,
Tammy
-
Dorian (MJT support)
- Automation Wizard
- Posts: 1414
- Joined: Sun Nov 03, 2002 3:19 am
Post
by Dorian (MJT support) » Fri Mar 07, 2025 2:28 pm
Yes, you have a few options. Probably the first one or last one will suit you :
Code: Select all
//Method 1. Check to see if the clipboard = "result".
//If it does, retry
Label>Retry
press CTRL
send>c
Release CTRL
GetClipBoard>result
If>result={"result"},Retry
Wait>0.5
Send>result
Code: Select all
//Method 2. Check to see if something you're expecting is in the clipboard.
//"fish" for example
GetClipBoard>result
pos>fish,result,1,posfish,
If>posfish>0
Wait>0.5
Send>result
Endif
Code: Select all
//Method 3. If you're expecting the result to be a certain length
//Greater than 30 characters for example
GetClipBoard>result
len>result,lenresult
If>lenresult>30
Wait>0.5
Send>result
Endif
Code: Select all
//Alternative suggestion. When copying, check to see if the clipboard has changed.
//If it hasn't, retry. if it has, continue
GetClipBoard>CB_before
Label>Retry
Press CTRL
Send>c
Release CTRL
GetClipBoard>CB_after
If>CB_before=CB_after,Retry
Wait>0.5
Send>result
Another thing to note is that sometimes if it's a long string it will overwhelm the target. We fix this with a Sendkey Delay :
Code: Select all
//Wait 50 milliseconds between each keystroke (adjust as necessary)
let>SK_Delay=50