open()
in
Programming Questions
•
1 year ago
Hello I wondered if anyone can help me..
What I am trying to achieve is a piece of code which loads a program, waits for the program to load before sending keystrokes to perform certain actions. I want to be able to load photoshop and do stuff in it before saving the file. at the moment im using the delay() function, however this is unreliable as the amount of time the program takes to load varies depending on how busy my computer is. this is the current code (i am using the robotclass library):
open("C:/Program Files/Adobe/Adobe Bridge CS5/Bridge");
robot.delay(20000);
robot.keyPress(KeyEvent.VK_O);
robot.keyRelease(KeyEvent.VK_O);
what i would like instead is something along the lines of:
open("C:/Program Files/Adobe/Adobe Bridge CS5/Bridge");
*wait for the program to load before sending further actions*
is this at all possible. thankyou in advance for your time.
2