malu05 Posted March 27, 2009 Share Posted March 27, 2009 Im trying to do a WinFlash on a window.I got 2 empty notepads open both with the name "Untitled - Notepad"I use WinList to get a list of active windows and filter our the ones from notepad.exei then feed the processID into Func _WinGetByPID($iPID) Local $aWList = WinList() For $iCC = 1 To $aWList[0][0] If WinGetProcess($aWList[$iCC][1]) = $iPID And _ BitAND(WinGetState($aWList[$iCC][1]), 2) Then Return $aWList[$iCC][0] EndIf Next Return SetError(1, 0, 0) EndFuncAnd try do a WinFlash on both handels.However only one of them will flash (the one that was last active).I guess it is a problem with the WinGetByPID function, can someone help me out here? [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 27, 2009 Share Posted March 27, 2009 Think about this: Return $aWList[$iCC][0] You return the window TITLE not the handle. Doing WinFlash two times on the same title will obviously flash the same window twice. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
malu05 Posted March 27, 2009 Author Share Posted March 27, 2009 Think about this: Return $aWList[$iCC][0] You return the window TITLE not the handle. Doing WinFlash two times on the same title will obviously flash the same window twice. Yes i realised but how can you get the Winhandle from the PID then? [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] Link to comment Share on other sites More sharing options...
ProgAndy Posted March 27, 2009 Share Posted March 27, 2009 The array from WinList has Title in [$n][0] and Handle in [$n][1] *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 27, 2009 Share Posted March 27, 2009 (edited) Yes i realised but how can you get the Winhandle from the PID then?You use the handle in WinGetProcess() and WinGetState() and still asks how to get it? You're joking right? Edited March 27, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
malu05 Posted March 27, 2009 Author Share Posted March 27, 2009 The array from WinList has Title in [$n][0] and Handle in [$n][1] Ohh lawl... guess it was just a typo then ^^ [center][u]WoW Machinima Tool[/u] (Tool for Machinima Artists) [/center] 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