|
|
#1 |
|
Does Applescript have a "SendKey" type command?
Coming from the Windows world, Im use to having a SendKey command in VB/VBA in programming. Is there something similar in Applescript?
What I am trying to do is run some keys whenever a specified window pops-up.
__________________
MacBook Pro 2.2GHz SR 4GB-RAM,120GB-HDD,128MB NVIDIA 8600M GT |
|
|
|
0
|
|
|
#2 |
|
You can use the keystroke command:
Code:
tell application "System Events"
keystroke "#" using {command down, shift down}
end tell
|
|
|
|
0
|
|
|
#3 |
|
thanks. Thats whats I was looking for.
Question though. How can I send a Command + F in TextEdit? So far I have this Code:
activate application "TextEdit" tell application "System Events" keystroke "F" end tell
__________________
MacBook Pro 2.2GHz SR 4GB-RAM,120GB-HDD,128MB NVIDIA 8600M GT |
|
|
|
0
|
|
|
#4 |
|
Try
Code:
tell application "TextEdit"
activate
tell application "System Events"
keystroke "f" using {command down}
end tell
end tell
|
|
|
|
0
|
|
|
#5 | |
|
Quote:
Thanks. Hmm... How come it says Command Down for the command key? Whats the down for? Do you have a good resouce for GUI scripting with Applescript?
__________________
MacBook Pro 2.2GHz SR 4GB-RAM,120GB-HDD,128MB NVIDIA 8600M GT |
||
|
|
0
|
|
|
#6 | ||
|
Quote:
Quote:
|
|||
|
|
1
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Apple ID does not have to equal iCloud e-mail | philipk | iCloud and Apple services | 6 | Nov 19, 2011 12:03 PM |
| Shapewriter for dragging your finger to type, does iphone have it? | theLemur | iPhone | 8 | Feb 10, 2011 11:42 PM |
| (applescript) is there a "vardump" command? | vrillusions | Mac Programming | 1 | Jan 26, 2011 04:48 PM |
| Does anyone have trouble with bootup commands using the aluminum keyboard? | afultz075 | iMac | 13 | Jun 10, 2009 05:58 AM |
| Applescript return argument given in command line | qpple | Mac Programming | 3 | Sep 11, 2007 09:28 AM |
All times are GMT -5. The time now is 01:28 AM.







Linear Mode

