Jump to content

weird problem


jing
 Share

Recommended Posts

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

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

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
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...