jing Posted October 20, 2006 Share Posted October 20, 2006 I encountered a very weird problem. It is a quite simple program with just two lines. WinWaitActive("Macromedia Dreamweaver 8 - [") WinMenuSelectItem("Macromedia Dreamweaver 8","", "&File", "&Open..."); However, it didn't work properly. The winMenuSelectItem function just didn't work. The weird thing is after I clicked File->Open manually. It would work totally fine. It looks like I have to select the manu item first to make the winMenuSelectItem function work. Anybody knows why it is so and how to deal with it? Link to comment Share on other sites More sharing options...
this-is-me Posted October 20, 2006 Share Posted October 20, 2006 I have had the same issue with Photoshop CS2. The problem is that it is not a "standard" menu from what I can see. I only solved my issue with ControlSend("Adobe Photoshop", "", "", "{CTRLDOWN}{ALTDOWN}i{ALTUP}{CTRLUP}")oÝ÷ Ù8^çè쨹ƧºÇºÚ"µÍÛÛÛÙ[ ][ÝÓXXÜÛYYXHX[]ÙX] ][ÝË ][ÝÉ][ÝË ][ÝÉ][ÝË ][ÝÞÐÕÕÓ[ÞÐÕTI][ÝÊ Who else would I be? Link to comment Share on other sites More sharing options...
jing Posted October 21, 2006 Author Share Posted October 21, 2006 I tried not to simply send a key stroke which will affect another program. Is there any other ways? Link to comment Share on other sites More sharing options...
this-is-me Posted October 21, 2006 Share Posted October 21, 2006 That is the reason for using controlsend. I did not mention send because it can affect other programs. Therefore, I posted the correct code. Who else would I be? Link to comment Share on other sites More sharing options...
ddeerr Posted October 21, 2006 Share Posted October 21, 2006 (edited) i have just now the same problem!! it work just one hour ago but now i cannot put text in an edit Dim $clefDeRecherche = "toto" ; i get handle from the first window ControlSend($wh, "", 1, "{HOME}") ControlSend($wh, "", $wh, "^f") WinWait("Bureau") $wh2 = WinGetHandle("Bureau") If Not @error Then WinSetState($wh2, "", @SW_SHOW) ControlSend($wh2, "", 1150, $clefDeRecherche) ; here is my problem, the text is not paste if i replace $clefDeRecherche by "toto" it works ????? i did nothing unusual on my computer, i code since 2 hours now ? did you have this problem, surrely a windows one ? If my program can be unuseful sometimes it will be the shame for me Edit : i use AutoItSetOption("WinTitleMatchMode", 4) for handle Edited October 21, 2006 by ddeerr Link to comment Share on other sites More sharing options...
jing Posted October 25, 2006 Author Share Posted October 25, 2006 That is the reason for using controlsend. I did not mention send because it can affect other programs. Therefore, I posted the correct code.no, it doesn't work. In fact it still sends key stroke to the application, only to the menu though. So it still got interference with my background application. Anybody can give me some hints to solve my problem? Link to comment Share on other sites More sharing options...
jing Posted October 26, 2006 Author Share Posted October 26, 2006 is there anyway to run a menu command without simplily sending a key stroke Link to comment Share on other sites More sharing options...
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