Sign in to follow this  
Followers 0
Ármányos Kő

InDesign slows down ClipGet and ClipPut DRASTICALLY

7 posts in this topic

Hi,

I am automating translation sentence lookup from my database. Everything works OK.

If InDesgin is used to grab text from and place text into my script must be slowed down to communicate with Clipboard properly.

For example this does not assign $Iwantthis in case of ClipGet:

Send("^c")
$Iwantthis = ClipGet()oÝ÷ Ø­¶¬Â䲫}ç-&®¶­sbb33c´äDEvâÒvävWEFFÆRgV÷C²gV÷C²¥6VæBgV÷Cµæ2gV÷C²¤b7G&ætå7G"b33c´äDEvâÂgV÷C´Fö&RäFW6vâgV÷C²fÇC²fwC²FVâ6ÆVWS¢b33c´vçGF2Ò6ÆvWBoÝ÷ Ø­¶è­Þ{^­ë-x,Av¬p¢¹"¶W½ë(®("©l¶çßzjmÊÜ*[¡ªÝ§¦VxiÉ-éh¢Gº^ÆÖ®¶­sd6ÆWBb33cµG&ç6ÆFöâ¢b33c´äDEvâÒvävWEFFÆRgV÷C²gV÷C²¤b7G&ætå7G"b33c´äDEvâÂgV÷C´Fö&RäFW6vâgV÷C²fÇC²fwC²FVâ6ÆVW¥6VæBgV÷CµçbgV÷C²oÝ÷ Ø­¶¬Â䲫}ç-&®¶­sd6ÆWBb33cµG&ç6ÆFöâ¢b33c´äDEvâÒvävWEFFÆRgV÷C²gV÷C²¤b7G&ætå7G"b33c´äDEvâÂgV÷C´Fö&RäFW6vâgV÷C²fÇC²fwC²FVâ×6t&÷ÂgV÷C²gV÷C²ÂgV÷C²gV÷C²Ã¥6VæBgV÷CµçbgV÷C²

Thanks for any help!

Share this post


Link to post
Share on other sites

WinWaitActive, and Opt("WinTitleMatchMode", 2) should help :D

Script is after WinActivate and WinWaitActive.

I know exactly when InDesign is being used, I am already in WinTitleMatchMode, 2.

MsgBox happens, if I want to.

Workaround would be to place MsgBox outside of screen? Is it possible?

Thanks

Share this post


Link to post
Share on other sites

Have a look at Clipboard Management in the UDFs helpfile.


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Have a look at Clipboard Management in the UDFs helpfile.

Turned out that InDesign uses some internal clipboard mechanism, and there is no control over that easily. It picks up stuff from Windows Clipboard arbitrary. A MsgBox with a 1 sec timeout solves the problem. Sleep(1000) does not.

How to make invisible MsgBox?

Edited by Ármányos Kő

Share this post


Link to post
Share on other sites

Turned out that InDesign uses some internal clipboard mechanism, and there is no control over that easily. It picks up stuff from Windows Clipboard arbitrary. A MsgBox with a 1 sec timeout solves the problem. Sleep(1000) does not.

How to make invisible MsgBox?

try increasing your Sleep delay. Possibly 1200 or 1500 will do it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

try increasing your Sleep delay. Possibly 1200 or 1500 will do it.

Not safe.

2000,2500 works well.

But my ultimate goal is about speed.

I think a half sec time out would work on the MsgBox, probably because of changing active windows?

Share this post


Link to post
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
Sign in to follow this  
Followers 0