Sign in to follow this  
Followers 0
Gordoni

ControlSend

7 posts in this topic

From help file :

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")

I wanna to click B on keyboard in window

Can any one help me with that?

Gordoni


Share this post


Link to post
Share on other sites



ControlSend("Window Name Here", "", "", "b")

That will simply push "b" in whatever window name you use.

Share this post


Link to post
Share on other sites

From help file :

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")oÝ÷ Øv­¡Ébr@hG²n«v)ðwhÀ&§j|¨è^Â+a¶­Ý¢x¿ªê-{jh²ÈX­É«­¢+Ù]¥¹Ñ¥ÙÑ ÅÕ½ÐíÝ¥¹½ÜÅÕ½Ðì¤)]¥¹]¥ÑÑ¥Ù ÅÕ½ÐíÝ¥¹½ÜÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°Ì¤)M¹ ÅÕ½ÐíÅÕ½Ðì¤oÝ÷ Ù«­¢+Ù
½¹Ñɽ±M¹ ÅÕ½ÐíÝ¥¹½ÜÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÌäíÐ%Ý¥Ñ ÔÍ¥¹¼¹áÌäì°ÅÕ½ÐíÅÕ½Ðì¤

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

what if window changing name ( winamp )

Example

name of song - Winamp

I wanna make hotkeyset for that and when winamp is minimalized i can play / stop etc


Share this post


Link to post
Share on other sites

what if window changing name ( winamp )

Example

name of song - Winamp

I wanna make hotkeyset for that and when winamp is minimalized i can play / stop etc

use class of window "[CLASS:your class]"

Cheers, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

I was try ControlSend("[CLASS:BaseWindow_RootWnd]","",'',"b")

and doesnt work

adding screen

post-42364-1230754828_thumb.jpg


Share this post


Link to post
Share on other sites

I was try ControlSend("[CLASS:BaseWindow_RootWnd]","",'',"b")

and doesnt work

adding screen

Winamp has its own options for hotkeys. I have an older version, but: Options->preferences->global hotkeys

You can use the option "WinTitleMatchMode" to allow Autoit to search anywhere within the Title. To allow it to be more robust, I would search for the Windle handle first, ensure that handle is only for Winamp (by checking the owning Process), then once you've confirmed it you can go accordingly.

#include <Process.au3>
Opt("WinTitleMatchMode",2) ;Allow Search for title substrings
$Winamphandle=WinGetHandle("[TITLE:Winamp; CLASS:Winamp v1.x]")
$winampPID=WinGetProcess($Winamphandle)

If _ProcessGetName ($winampPID) <> "winamp.exe" Then
    MsgBox(16, "Error", "Couldn't identify Winamp")
    Exit
EndIf

ControlSend($Winamphandle,"","trytoidentifycontrolname","b")

You identified the window, but not the control. From your example, it might be something like:

ControlSend($Winamphandle,"","[CLASS:BaseWindow_RootWnd]","b")

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  
Followers 0