Jump to content
Sign in to follow this  
jing

weird problem

Recommended Posts

jing

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?

Share this post


Link to post
Share on other sites
this-is-me

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?

Share this post


Link to post
Share on other sites
jing

I tried not to simply send a key stroke which will affect another program.

Is there any other ways?

Share this post


Link to post
Share on other sites
this-is-me

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?

Share this post


Link to post
Share on other sites
ddeerr

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 :lmao:

Edit : i use AutoItSetOption("WinTitleMatchMode", 4) for handle

Edited by ddeerr

MsgBox(0, "Steven Seagal", "Les poches bourrées de Pesos")

Share this post


Link to post
Share on other sites
jing

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?

Share this post


Link to post
Share on other sites
jing

is there anyway to run a menu command without simplily sending a key stroke

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×