Interesting typeText Problem...

Hey all–

I have a handler for mac that fires the Go To Folder dialog:

to goToFolder folderName
	typeText COMMANDDOWN
	typeText SHIFTDOWN
	typeText "g"
	typeText COMMANDUP
	typeText SHIFTUP
	typeText folderName
	typeText ENTER
end goToFolder

Simple, straight forward. However, when I call it like this (one of many examples):

goToFolder "~/Desktop"

I get `/Desktop consistently the first time it’s run, and about every 3rd or 4th time after that I get “~/desktop”

If I pull the typeText stuff out and put it in a repeat loop, it works just fine. Any ideas, or is this a timing problem I need to figure out?

That sounds like a timing problem – most likely the SUT just needs a moment to bring up the Go To Folder sheet before it’s ready to accept the path that you’re typing. You might insert a WaitFor command before the “typeText folderName” to look for the sheet’s presence on the screen before continuing with typing.

Allen,

You’re saying that instead of the tilde character, you get a back tick, right? It was a little hard to pick out on the forum post. That makes me think it’s related to the hardware settings, not a timing issue.What are the keyboard settings on your Vine server (in Preferences, under devices)?

You might want to rewrite your handler using the newer key commands as follows:

to goToFolder folderName
	typeText commandKey, shiftKey, "g"
	typeText folderName, enter
end goToFolder

I don’t think that will be likely to change the behavior, but it’s cleaner.

Matt and Doug–

Thanks. I suspected a timing problem. That’s part of why the typeText commands were split up like that in the first place–take advantage of Ye Olde remoteworkinterval :wink:.

I have an additional problem with this handler, and it’s more of a general problem with 10.5 using the latest VINE sever, and the latest Eggplant release. Often, when I issue typeText ENTER it sends the ENTER key more than once. If I run this handler on 10.5 as is, the last typeText ENTER not only OK’s the Go To Folder panel, it also OK’s the Save Dialog behind it. Kinda hard to click the new folder button…

We do have functionality in our app to “Power OK” out of all open dialogs, but I threw in a “keyUp ALLKEYS” command in for good measure, but the problem persists.

Any suggestions would be much appriciated.

What are the keyboard settings on your Vine server (in Preferences, under devices)?

They are:

  • Keyboard Layout: US
  • Keyboard Events: Smart Event Management

Those are the settings that I would recommend, so that’s not the problem.

You mentioned having added a KeyUp allKeys command; where did you put that? Was it inside the handler?

And can you confirm that the back tick is the issue? Is there also a difference in the capitalization of “Desktop” or is that just a typing glitch?

Are you running against a separate SUT, or is this a second user on the Eggplant machine? If this is a separate machine, are you running against the main display or is it a secondary user account?

Ok – back to the original topic – are you getting a backtick? Because that wouldn’t be an Eggplant timing problem. If that is the problem – are you running on a dedicated SUT or is that occurring in an Off-screen session?

This is in the next-to-last line of the handler, right before typeText ENTER

Not sure what you mean here. This is much later in the script, and I’ve had this problem in other handlers as well.

Separate SUT, main display. I’ve had too many timing issues with secondary displays.

Not all the time, only when VNC misses the shift key part of typing “~”

Dedicated SUT.

Ok – now this is really weird. Backtick should not be showing up with those settings so something is really strange.

What is your sendShiftForCaps set to in Eggplant?
What are the arguments you use when launching Vine Server (if it’s Vine Server)?

I’d try putting the KeyUp allKeys statement right at the beginning of the handler.

In your original post you wrote:

I get `/Desktop consistently the first time it’s run, and about every 3rd or 4th time after that I get “~/desktop”
I was trying to determine if the difference in capitalization of “desktop” in that sentence was actually a symptom or just something that you typed differently.

[quote=“EggplantMatt”]I’d try putting the KeyUp allKeys statement right at the beginning of the handler.

In your original post you wrote:

I get `/Desktop consistently the first time it’s run, and about every 3rd or 4th time after that I get “~/desktop”
I was trying to determine if the difference in capitalization of “desktop” in that sentence was actually a symptom or just something that you typed differently.[/quote]
Not a typo, but that behavior has gone away. Sticking the keyup ALLKEYS at the beginning of the handler has no effect.

[quote=“JonathanOSX”]Ok – now this is really weird. Backtick should not be showing up with those settings so something is really strange.

What is your sendShiftForCaps set to in Eggplant?
What are the arguments you use when launching Vine Server (if it’s Vine Server)?[/quote]

sendShiftForCaps==true

Vine server is set to launch as a system service. I have not customized any runtime arguments at all on any of my systems.

Ok – the backtick behavior is definitely starting to feel like a Vine Server/OS problem on the SUT.

What version of Mac OS, version of Vine Server, and what physical hardware are you seeing this on? (Feel free to mention all that apply).

Jonathan–

It’s a MacMini, and a screen shot of the Vine and Mac about boxes is attached.

Is this related to the fact that I’m getting two enter keyboard events?

I don’t know about anyone else, but I don’t actually see the attached files. Is it just me?

BTW, Allen, I don’t know if you noticed, but you have a new status as a poster; I added a category – the AuberGenie, fulfilling the wishes of Eggplant users with more than 100 posts!

I uploaded it… but I’ll summarize in text:

MacOS 10.5.4
Mac MINI 1.67GB Core Duo
2GB RAM
Latest Vine Server.

Here is a video of what is happening on the system. Just fit this to screen and watch the fun.

Any Luck? I’ve worked around the double enter thing, but there are some other significant problems popping up.

I just had the backtick behavior return. This is after a full wekend closed. It did that behavior only once, subsequent runs and launches of the app seem to be fine.

There’s another wrinkle, I’m seeing a lowercase “~/desktop” getting typed every so often. This happens way too many times out of every 250. I’ve attached a script doing a typeText a couple of different ways, with the results and the log. If you want to run this script yourself, simply launch textEdit on a 10.5 SUT and this will do the rest.

I am going to look at the SUT a little more. Maybe I can figure something out in the settings.