Problem with 'Press CTRL' and citrix
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 12
- Joined: Wed Mar 02, 2005 9:32 pm
Problem with 'Press CTRL' and citrix
I don't think "Press CTRL" works over citrix.
As a simple test I opened Excel thru citrix and then recorded the following:
I clicked on a cell with some text, pressed CTRL-c to copy, clicked on another cell and pressed CTRL-v to paste it.
When I played it back it simply sent 'c' & 'v' -- no CTRL.
I then ran that same script against a local copy of Excel and it worked fine, copy-n-pasting.
Here's the code...
Press CTRL
Wait>0.45
Send>c
Wait>0.85
Release CTRL
Wait>0.43
MouseMove>135,178
Wait>1.05
LClick
Wait>1.2
Press CTRL
Wait>0.52
Send>v
Wait>0.54
Release CTRL
Any ideas? Is there some way I can simply send CTRL-C ?
I think the following post had a simliar issue:
http://www.mjtnet.com/forum/viewtopic. ... ght=citrix
Please help!
As a simple test I opened Excel thru citrix and then recorded the following:
I clicked on a cell with some text, pressed CTRL-c to copy, clicked on another cell and pressed CTRL-v to paste it.
When I played it back it simply sent 'c' & 'v' -- no CTRL.
I then ran that same script against a local copy of Excel and it worked fine, copy-n-pasting.
Here's the code...
Press CTRL
Wait>0.45
Send>c
Wait>0.85
Release CTRL
Wait>0.43
MouseMove>135,178
Wait>1.05
LClick
Wait>1.2
Press CTRL
Wait>0.52
Send>v
Wait>0.54
Release CTRL
Any ideas? Is there some way I can simply send CTRL-C ?
I think the following post had a simliar issue:
http://www.mjtnet.com/forum/viewtopic. ... ght=citrix
Please help!
Odd. Just out of interest, try this:
VBSTART
Sub CtrlC
Set Wsh = CreateObject("Wscript.Shell")
'change app name below
Wsh.AppActivate "Notepad"
Wsh.SendKeys "^c"
End Sub
VBEND
VBRun>CtrlC
For more info on this method of sending keystrokes see:
http://www.mjtnet.com/forum/viewtopic.php?t=1696
VBSTART
Sub CtrlC
Set Wsh = CreateObject("Wscript.Shell")
'change app name below
Wsh.AppActivate "Notepad"
Wsh.SendKeys "^c"
End Sub
VBEND
VBRun>CtrlC
For more info on this method of sending keystrokes see:
http://www.mjtnet.com/forum/viewtopic.php?t=1696
MJT Net Support
[email protected]
[email protected]
-
- Newbie
- Posts: 12
- Joined: Wed Mar 02, 2005 9:32 pm
-
- Newbie
- Posts: 12
- Joined: Wed Mar 02, 2005 9:32 pm
-
- Newbie
- Posts: 12
- Joined: Wed Mar 02, 2005 9:32 pm
If you'd like to try it out, I found a company with a demo app on citrix. It has the same issue.
To test simply open up an outlook note, write some text and try to cut-n-paste it.
http://forms.frontrange.com/form.asp?fid=65
Thanks,
Jon
To test simply open up an outlook note, write some text and try to cut-n-paste it.
http://forms.frontrange.com/form.asp?fid=65
Thanks,
Jon
Hi,
We have found a solution for handling ctrl/shift/alt under Citrix.
It appears that a change we made some time back to fix an issue sending these keystrokes in Windows 2000 stopped them working under Citrix. Typical! Therefore, rather than unfix it again, we have added a variable called SK_LEGACY which can be set to 1 to force MSched to use the old method for sending these keys.
Jon has tested this successfully and the solution will be available in the next update.
We have found a solution for handling ctrl/shift/alt under Citrix.
It appears that a change we made some time back to fix an issue sending these keystrokes in Windows 2000 stopped them working under Citrix. Typical! Therefore, rather than unfix it again, we have added a variable called SK_LEGACY which can be set to 1 to force MSched to use the old method for sending these keys.
Jon has tested this successfully and the solution will be available in the next update.
MJT Net Support
[email protected]
[email protected]
Hi,
Anyway, I was able to open up a note and simulate CTRL sequences successfuly without having to use SK_LEGACY. I did have to slow the process down a lot to allow for network lag. Basically at the above page you are looking at a Java frame containing the screen of the remote machine. The Java app is simply transferring mouse and keyboard events one way and screen images the other. One has to use the mouse to click in the screen before any input can be simulated to allow the java app to capture the mouse and keyboard. Once that is done we can send the keystrokes. I had to slow the mouse click right down to successfully activate the application. Here's my script that works on an Outlook note that has been maximised:
SetFocus>Runaware*
Wait>1
MouseMove>123,285
LDown
Wait>1
LUp
Send>hello world
Wait>1
Press CTRL
Send>a
Release CTRL
Wait>1
Press CTRL
Send>c
Release CTRL
This clicks, slowly (separating the Down and Up), on the window to activate it, and then sends some text "hello world". It then hits CTRL-a to select all the text followed by ctrl-c to copy it to the clipboard.
The text is successfully highlighted and then I am able to paste it back, proving that it was copied to the clipboard.
Note I did not have to use SK_LEGACY.
Can you clarify whether you are running msched on the server or on your local machine to automate a remote session?
As it happens, I was unable to replicate the problem here. This also has me a little confused. I was under the impression you were running Macro Scheduler *within* a citrix environment. This message implies you are actually connecting remotely to a workstation via citrix with Macro Scheduler installed on the local machine and controlling the citrix session via your machine. In which case there should be no issue other than network lag.JonHodgson wrote:If you'd like to try it out, I found a company with a demo app on citrix. It has the same issue.
To test simply open up an outlook note, write some text and try to cut-n-paste it.
http://forms.frontrange.com/form.asp?fid=65
Anyway, I was able to open up a note and simulate CTRL sequences successfuly without having to use SK_LEGACY. I did have to slow the process down a lot to allow for network lag. Basically at the above page you are looking at a Java frame containing the screen of the remote machine. The Java app is simply transferring mouse and keyboard events one way and screen images the other. One has to use the mouse to click in the screen before any input can be simulated to allow the java app to capture the mouse and keyboard. Once that is done we can send the keystrokes. I had to slow the mouse click right down to successfully activate the application. Here's my script that works on an Outlook note that has been maximised:
SetFocus>Runaware*
Wait>1
MouseMove>123,285
LDown
Wait>1
LUp
Send>hello world
Wait>1
Press CTRL
Send>a
Release CTRL
Wait>1
Press CTRL
Send>c
Release CTRL
This clicks, slowly (separating the Down and Up), on the window to activate it, and then sends some text "hello world". It then hits CTRL-a to select all the text followed by ctrl-c to copy it to the clipboard.
The text is successfully highlighted and then I am able to paste it back, proving that it was copied to the clipboard.
Note I did not have to use SK_LEGACY.
Can you clarify whether you are running msched on the server or on your local machine to automate a remote session?
MJT Net Support
[email protected]
[email protected]
-
- Newbie
- Posts: 12
- Joined: Wed Mar 02, 2005 9:32 pm
I am running msched on my local machine, a Win2K Pro SP4 Dell Latitude D600 Laptop.
I double-checked using your script, and what i got in the outlook note was:
hello worldac
As you can see, the CTRL never made it across so the a & c keypresses were treated as regular typed characters.
When i turned SK_LEGACY on it then worked and copied the text into the clipboard.
Let me know if you want me to run any other tests, but i am indeed still having the issue.
I double-checked using your script, and what i got in the outlook note was:
hello worldac
As you can see, the CTRL never made it across so the a & c keypresses were treated as regular typed characters.
When i turned SK_LEGACY on it then worked and copied the text into the clipboard.
Let me know if you want me to run any other tests, but i am indeed still having the issue.
Hi,
That's interesting because that script worked fine here. I'm running XP. So my feeling is this is not neccessarily a Citrix issue after all. Given that you're running msched on your local machine, not within a citrix session and that it works for me, this looks more like a difference between XP and Win2k. The peculiar thing is the SK_LEGACY=1 switch makes it work how it used to work when issues were reported running on Win2k! Doesn't quite make sense.
Anyway, at least you now have a solution with the option of using either method using SK_LEGACY=1/0. The important thing is you have a solution.
That's interesting because that script worked fine here. I'm running XP. So my feeling is this is not neccessarily a Citrix issue after all. Given that you're running msched on your local machine, not within a citrix session and that it works for me, this looks more like a difference between XP and Win2k. The peculiar thing is the SK_LEGACY=1 switch makes it work how it used to work when issues were reported running on Win2k! Doesn't quite make sense.
Anyway, at least you now have a solution with the option of using either method using SK_LEGACY=1/0. The important thing is you have a solution.
MJT Net Support
[email protected]
[email protected]
-
- Newbie
- Posts: 12
- Joined: Wed Mar 02, 2005 9:32 pm
I want to publicly say that your responsiveness to this (and other) issues has been outstanding!
It is becoming more rare in this day and age to get good support, however yours has been excellent.
While there are free tools that can technically do some of what MS does, the confidence that I have a great support team watching my back makes all the difference, and worth every penny.
Thanks again.
It is becoming more rare in this day and age to get good support, however yours has been excellent.
While there are free tools that can technically do some of what MS does, the confidence that I have a great support team watching my back makes all the difference, and worth every penny.
Thanks again.
CTRL Seems to Work with SK_LEGACY=1 BUT!
I am having similar issues with Citrix. Setting variable SK_LEGACY=1 solved the inability to use the CTRL key in a Citrix Window, but when I try to highlight text using the SHIFT END or SHIFT HOME the text remains unhighlighted. I need to copy text to the Clipboard and then into variables to use in another application. Is there any workaround for this?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Rick,
I received two support tickets from you today on this issue and have responded with some things to try. I am concerned you are not receiving our emails as you have sent duplicate tickets.
Mail server logs show that your mail server accepted my email for delivery, so you should have received it, but let me know if not.
I received two support tickets from you today on this issue and have responded with some things to try. I am concerned you are not receiving our emails as you have sent duplicate tickets.
Mail server logs show that your mail server accepted my email for delivery, so you should have received it, but let me know if not.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi Marcus - I am having the same issue as this, was there a fix for this issue?mtettmar wrote:Rick,
I received two support tickets from you today on this issue and have responded with some things to try. I am concerned you are not receiving our emails as you have sent duplicate tickets.
Mail server logs show that your mail server accepted my email for delivery, so you should have received it, but let me know if not.
Rgds
Mike
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Shocam - you quoted a post written in 2006 regarding an issue with email not arriving. The fix to the original issue is to use SK_LEGACY. If you have some other issue please clarify and provide some details.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi Marcusmtettmar wrote:Shocam - you quoted a post written in 2006 regarding an issue with email not arriving. The fix to the original issue is to use SK_LEGACY. If you have some other issue please clarify and provide some details.
Sorry for the confusion-I am having trouble with using SHIFT in citrix. I have set SK_LEGACY=1 but citrix will still not recognise the SHIFT key being pressed.