Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Send has problems with Adobe Illustrator


  • Please log in to reply
18 replies to this topic
Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

a very strange thing:

If I use Send,{ASC 132} in Adobe Illustrator it produces áãâ
or sometimes nothing, even Send,„ does the same. I've tried with keydelays but without any success. Someone reported me, that sometimes it works. I've tried versions down to 1.0.18 and also the Hook does not help. It does not depend on the hotkey used.

What's going wrong?

Well, Illustrator is a bit slow drawing the chars on the screen, but that could not be the point. Non-High-ASCII-Chars have no problem, but also the high chars äöü (umlauts) does work.

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
If you have a script running that defines Alt+Numpad hotkeys, be sure those hotkeys use the hook (via #UseHook). This is because AutoHotkey holds down the Alt key and simulates numpad keypresses to generate ANSI characters such as diacritic vowels.

If that doesn't help, note that "Send,{ASC 132}" should be equivalent to "Send, {Alt down}{Numpad1}{Numpad3}{Numpad2}{Alt up}". You might try substituting that to see if it helps. For testing purposes, you could also try typing that sequence manually to see if it makes any difference.

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

it all does not help. No Hook and also simulating the Numpad.

+1::Send, {Alt down}{Numpad0}{Numpad1}{Numpad3}{Numpad2}{Alt up}

I'll get the same result.

Btw. the last post was wrong, it should be {ALT 0132}. It seems to be a problem with Send.

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Try typing the sequence manually, both inside Adobe Illustrator and in other applications: Hold down ALT and type 0132 on your keypad.

I just did it now and got this: „

Maybe there is something in Adobe Illustrator that prevents these keystrokes from working, whether you type them manually or script them.

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

Illustrator CS will accept all manual entered characters, also with ALT+0+1+3+2. In every Application I'll get „, but not in Illustrator when it is send form AutoHotkey. Strange is that Photoshop CS does also not accept Send,„ and Send,{ASC 0132} but Send, {AltDown}{Numpad0}{Numpad1}{Numpad3}{Numpad2}{AltUp} works correct.

Tekl

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi Chris,

now I found a way:

SetKeyDelay,1,1
!1::Send,{AltDown}{Numpad0}{Numpad1}{Numpad3}{Numpad2}{AltUp}

But's very slow if you want to type more chars. Illustrator seems to be too slow, because the Workaround with Clipboard and Send,^v does not work.

It seems, that only Keys which are naturally directly accessible via one keypress on the keyboard work with illustrator/Photoshop and the send-command.

Tekl

BoBo
  • Guests
  • Last active:
  • Joined: --
Wie schauts mit ControlSend oder ControlSetText oder ControlSendRaw?
What about ControlSend or ControlSetText or ControlSendRaw?

8)

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

why should ControlSend be different? I tried this:

F5::ControlSend,,Hallo,Adobe Illustrator

The Result aft 3 times F5: hALlo hALLo HAllo

It works if I increase the KeyDelay to:

SetKeyDelay,70,1

Well, it's not a AHK-Problem, GhostTyper XML has the same Problems with Illu and Photoshop.

Is it possible to improve the Send-Command, that it waits for a reaction after sending a char.

How does it send high-ascii-chars? Why does {ASC 0132} not work but a very slow {AltDown}{Numpad...AltUp}? It seems, that keydelay does not delay modifier-keys, am I right?

Tekl

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

it's going stranger and stranger: A manual ALT+8+7+2+1 (∑) does work in any unicode capable application, but not in Illustrator. I'll get a ?. Copying it from another unicode-application works as expected.

Is there a way to put Unicode-Chars to clipboard? I thought about a small edit-box, sending {ALT 8721}, copying und pasting to illustrator, but it should be fast and nobody should see how it is done. Does anyone have a better idea?

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

Is it possible to improve the Send-Command, that it waits for a reaction after sending a char.

Offhand I don't know how, but I will keep a lookout for some method.

How does it send high-ascii-chars? Why does {ASC 0132} not work but a very slow {AltDown}{Numpad...AltUp}? It seems, that keydelay does not delay modifier-keys, am I right?

Yes, by default there is no delay after modifier keys are changed (this can be altered via the second parameter of SetKeyDelay). In addition, there is never any delay during the {Asc nnnnn} method.

Is there a way to put Unicode-Chars to clipboard? I thought about a small edit-box, sending {ALT 8721}, copying und pasting to illustrator, but it should be fast and nobody should see how it is done. Does anyone have a better idea?

Your ideas are the best. I can't think of any way to get Unicode characters onto the clipboard without involving some other application. Perhaps there is a command line utility to put Unicode onto the clipboard?

Note: I don't think your idea of using an AutoHotkey Gui edit field will work because Edits created by AutoHotkey probably can't understand Unicode.

Finally, there is an item high on the to-do list to try to provide basic Unicode support for the clipboard (though right now, I don't know for sure how hard it will be).

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

I tried it with a hidden Notepad but the problem is, that ControlSend does not support {ASC...}.

#F10::
Run, notepad.exe,,,pID
WinWait,ahk_id %pID%
ControlSend,Edit1,{ASC 0132},ahk_class Notepad
ControlGetText,varText,Edit1,ahk_class Notepad
clipboard = %varText%
return

And why does ControlSend not work with ahk_id %pID%?

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

ControlSend does not support {ASC...}.

Yes, I couldn't find any way to make it work. I'm still researching ways to provide some kind of basic Unicode support.

And why does ControlSend not work with ahk_id %pID%?

ahk_id signifies a window ID, which is a different type of ID than a process ID. To wait for a process , use "Process, Wait, SomeProcessName" instead, though of course in this case you know the process already exists.

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Thank Chris,

so I also could not ControlSend to a Process, but a Window?

Is it possoble to let AHK catch the Send-output in any way or sending directly to clipboard?

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

so I also could not ControlSend to a Process, but a Window?

Yes. I would suggest using PostMessage to send the characters (as illustrated in other forum topics), but that too requires a target window, not a process.

Is it possoble to let AHK catch the Send-output in any way or sending directly to clipboard?

Not that I can think of, but I will try to add some basic Unicode in the next day or two if I can find a way to do it easily. I've also been thinking more about the longer-term possibility of releasing a separate entirely-Unicode version.

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Thanks Chris,

I've also been thinking more about the longer-term possibility of releasing a separate entirely-Unicode version


That would be the best way, so people who don't use unicode, have small skripts and exes.

Tekl