Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2006, 11:08 AM
Junior Member
 
Join Date: May 2006
Posts: 9
Default how pilot a button

hello,

I want pilot a button of an other application.
I now how find my button like a Window Object:

Code:
var ws = Window.find("#32770","Nikon Capture Camera Control");

//for (var i = 0; i < ws.length; i++)
// {  
  trace("caption:  "+ws.caption);
    trace("handle:   "+ws.handle );
    trace("className:"+ws.className );
    trace("*************************************************************************");
 //   }
 ws.bringToTop();
    trace ("xxxxxxxxxxxxxxxxxxxxxxxxxxCHILDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    
var wchild=  ws.getChildren();
 for (var i = 0; i < wchild.length; i++)
 {  
  trace("caption:  "+wchild[i].caption);
    trace("handle:   "+wchild[i].handle );
    trace("className:"+wchild[i].className );
    trace("*************************************************************************");
    if (wchild[i].caption=="Download Options...")
    {DO_Btn=wchild[i];}
    }
DO_Btn is the button
but I search how click or do like...
in fact I want pilot another application with swfKit...
I hope it's possible.

thanks
Kado
ps: sorry for my english :-[ :-\ ;D
Reply With Quote
  #2 (permalink)  
Old 06-09-2006, 04:48 PM
Junior Member
 
Join Date: May 2006
Posts: 9
Default Re:how pilot a button

nothink

nobody have an idea?!!

PLEASE HELP!!!!! :'(
Reply With Quote
  #3 (permalink)  
Old 06-09-2006, 05:01 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:how pilot a button

Please try to send a mouse message to the button:

Code:
function MakeLong(x, y)
{
return x | (y << 16);
}

Application.sendMessage(Do_Btn.handle, 
0x201/*WM_LBUTTONDOWN*/, 
1/*MK_LBUTTON*/, 
MakeLong(Do_Btn.left + 1, Do_Btn.top + 1));
Reply With Quote
  #4 (permalink)  
Old 06-09-2006, 05:18 PM
Junior Member
 
Join Date: May 2006
Posts: 9
Default Re:how pilot a button

I add that (for the release):

Code:
Application.sendMessage(Do_Btn.handle,0x202/*WM_LBUTTONUP*/,1/*MK_LBUTTON*/,MakeLong(Do_Btn.left + 1, Do_Btn.top + 1));
but it's not work... :-\ before and after the add...

Reply With Quote
  #5 (permalink)  
Old 06-10-2006, 10:47 AM
Junior Member
 
Join Date: May 2006
Posts: 9
Default Re:how pilot a button

I have done an exemple with the Display Properties of Windows XP.
http://adonnoh.free.fr/swfkit/pilotApp.rar

I try to click the cancel button....you can see, it's don't work.
(be careful: you have to change 2 vars in the begining for the english version of XP.)

thank for the help... ;D
Kado
Reply With Quote
  #6 (permalink)  
Old 06-10-2006, 12:31 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:how pilot a button

Please try
Code:
Application.sendMessage(cancel_Btn.handle, /*BM_CLICK*/0x00F5, 0, 0);
Reply With Quote
  #7 (permalink)  
Old 06-10-2006, 01:03 PM
Junior Member
 
Join Date: May 2006
Posts: 9
Default Re:how pilot a button

yeees It's work ;D ;D ;D

thank's
(merci beaucoup)

a little bonus question:
can I know when I Lunch a .exe with Shell.run when the Appli is Ready.

Thank's for all, one more time....
Kado ;D
Reply With Quote
  #8 (permalink)  
Old 06-12-2006, 09:17 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:how pilot a button

You would have to develop a dll by yourself to launch the program by using the "CreateProcess" function, and by using the "WaitForInputIdle" function you can wait for the program to be ready. All these two functions are windows functions.
Reply With Quote
  #9 (permalink)  
Old 06-12-2006, 11:49 AM
Junior Member
 
Join Date: May 2006
Posts: 9
Default Re:how pilot a button

I don't know how make a dll, I don't know the C++, but it's not important, thanks for all... ;D

Kado
french touch
http://adonnoh.free.fr
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:43 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.