mcbuddah Posted July 7, 2004 Posted July 7, 2004 I am writing a script that changes the settings of Microsoft Word. I tried using keyboard shortcuts to access the menus, ex: Alt F for the "File Menu". But for the "Tools" menu (Alt T) when I use the Send command it inserts the current time of day. Send("{ALTDOWN}TC{ALTUP}") If you were to manually go in to word and hit "Shift" "Alt" "T", this would insert the time. But no where in my script do I use the Shift key. I'm stumped.
pekster Posted July 7, 2004 Posted July 7, 2004 That works fine for me. I open a new document in WinWord (version 2002 or "Office XP") and use the following script: WinActivate("Document1 - Microsoft Word") Send("{ALTDOWN}tc{ALTUP}") The following code also worked for me: WinActivate("Document1 - Microsoft Word") Send("!tc") [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
emmanuel Posted July 7, 2004 Posted July 7, 2004 I am writing a script that changes the settings of Microsoft Word. I tried using keyboard shortcuts to access the menus, ex: Alt F for the "File Menu". But for the "Tools" menu (Alt T) when I use the Send command it inserts the current time of day. Send("{ALTDOWN}TC{ALTUP}") If you were to manually go in to word and hit "Shift" "Alt" "T", this would insert the time. But no where in my script do I use the Shift key. I'm stumped. sending "T" is different than sending "t" , it sends it as shift+t if it's uppercase. "I'm not even supposed to be here today!" -Dante (Hicks)
pekster Posted July 7, 2004 Posted July 7, 2004 sending "T" is different than sending "t" , it sends it as shift+t if it's uppercase.Heh, somehow I managed to miss that. That's what I get for typing in the script myself instead of copy and pasting it. I just fixed the error when I re-typed it. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
mcbuddah Posted July 8, 2004 Author Posted July 8, 2004 sending "T" is different than sending "t" , it sends it as shift+t if it's uppercase.So all I had to do was turn off the caps lock.
emmanuel Posted July 8, 2004 Posted July 8, 2004 yeah, gotta watch out for that caps lock key, it's EVIL! "I'm not even supposed to be here today!" -Dante (Hicks)
mbailey Posted December 16, 2005 Posted December 16, 2005 On the topic of menu bars, anyone know why don't Windows apps have control IDs for the menu bar? I wish I could send commands to the menu bar like I can with buttons and checkboxes--do I have to settle for Send()? Thanks in advance...
LxP Posted December 19, 2005 Posted December 19, 2005 WinMenuSelectItem() will do the job for most menu bars.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now