quaizywabbit Posted March 16, 2005 Share Posted March 16, 2005 (edited) For those of you who like to manipulate other program windows:05 MAR, 2007 ANYGUIv2.8 ANYGUIv2.8.au3modified _GuiTarget( ) to accept array in ControlId parameter to specify x/y CLIENTcoords of point in control(for those pesky .Net controls where controlid/classnameNN change frequently)for example:Dim $coords[2] $coords[0] = 200 ;point x to check in CLIENT COORDS $coords[1] = 29;point y to check in CLIENT COORDS WinActivate("Edit Database Item") $Ctrltarget = _GuiTarget("Edit Database Item", "", "", $coords) Edited September 4, 2007 by quaizywabbit ScrapeYourself and numdig 1 1 [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 (edited) i was trying to do this a few minutes ago, good job! edit: i tryed it, but i can't get it to work here is my code _GuiTarget ( "My Test" ) _TargetAddButton ( "Test", 3, 3, 50, 30 ) Edited March 16, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 yes [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 why isn't GUISetState(@SW_SHOW) in the functions? [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
myredeemerlives Posted March 16, 2005 Share Posted March 16, 2005 Woa, I so totally never thaught of this in my entire life. This is one hot tomally script. You go boy. Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 Yay, i got it to work. This is awesome. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 you might want to set everything up using arrays and doing lots of ReDimming that way we can control multiple things with a msg loop [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 you can't, the functions don't return anything [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Crome_BAD Posted March 16, 2005 Share Posted March 16, 2005 Do you NEED to have a target control when you use _GUITarget? In your example you use one, so i didnt know. Crome Link to comment Share on other sites More sharing options...
SumTingWong Posted March 16, 2005 Share Posted March 16, 2005 What's up doc? Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 16, 2005 Share Posted March 16, 2005 No you dont. [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
Crome_BAD Posted March 16, 2005 Share Posted March 16, 2005 Ok thank you much for your help! Crome Link to comment Share on other sites More sharing options...
Valik Posted March 18, 2005 Share Posted March 18, 2005 Doesn't that parameter make sense, though? Don't you think it's important enough that each function gets it? I mean, in a library which creates controls on 3rd-party windows, I kind of expect there to be a parameter in the function allowing me to specify what window I want to add to. Link to comment Share on other sites More sharing options...
Valik Posted March 19, 2005 Share Posted March 19, 2005 To embed a control into another window, I expect to make 1 function call and that's it. None of this GuiTarget() garbage. No fooling with global variables. Each function stand-alone and with no dependancies. Link to comment Share on other sites More sharing options...
Insolence Posted March 19, 2005 Share Posted March 19, 2005 How would you do it Valik? I think he's going for the same kind of thing as 'GUICreate,' and then adding controls. I'd rather do his way then specifying a window each time? "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 19, 2005 Share Posted March 19, 2005 i prefer the targeting to speed up writing it but it would be extremely simple to do it without [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 20, 2005 Share Posted March 20, 2005 you still don't have GuiShow() in the functions [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 21, 2005 Share Posted March 21, 2005 (edited) oops i wasnt thinking i ment GuiSetState() edit: grammer error Edited March 21, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
quaizywabbit Posted March 21, 2005 Author Share Posted March 21, 2005 Ya might have missed this post earlier.....Left it out so other things like GUICtrlSetColor , GUICtrlSetImage , etc.....can be inserted prior to calling GUIsetState() [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
DaleHohm Posted March 22, 2005 Share Posted March 22, 2005 here's an example use...not perfect, but all controls and child windows show ok;<{POST_SNAPBACK}>Here's my attempt at modifying the previous example to work with the new parameters and parameter order... please feel free to correct anything I've misunderstood.Daleexpandcollapse popup#region Hoster demo addbutton opt ("WinTitleMatchMode", 2) #include <ANYGUI.au3> #include <GUIConstants.au3>; must be included in main script for GUI Functions to work Dim $myVar1, $myVarB1, $myVarB2, $myVarB3, $myVarB4, $myVarB5, $myVarB6, $myVarC1 Run('C:\Program Files\Micro Technology Unlimited\Hoster Demo\Hoster-demo.exe') Sleep(8000) WinActivate("Dialog") ControlClick("Dialog", "Demo", 1); clears demo dialog box WinSetState(" - Hoster", "", @SW_MAXIMIZE) Sleep(2000) ControlMove("Hoster", "", 1017, 20, 239, 700, 463) $myVar1 = _GuiTarget("Hoster", "", "", 59648);<===Target is control on main application. $myVarB1 = _TargetAddButton("Test", 750, 20, 100, 50, "", "", $myVar1) GUISetState(@SW_SHOW) $myVarB2 = _TargetAddButton("Test", 860,20, 100, 50, "", "", $myVar1) GUISetState(@SW_SHOW) $myVarB3 = _TargetAddButton("Test", 750,80, 100, 50, "", "", $myVar1) GUISetState(@SW_SHOW) $myVarB4 = _TargetAddButton("Test", 860,80, 100, 50, "", "", $myVar1) GUISetState(@SW_SHOW) $myVarB5 = _TargetAddButton("Test", 750,140, 100, 50, "", "", $myVar1) GUISetState(@SW_SHOW) $myVarB6 = _TargetAddButton("Test", 860,140, 100, 50, "", "", $myVar1) GUISetState(@SW_SHOW) $myVarC1 = _TargetChildCreate("Testing", 730, 200, 300, 600, $myVar1) GUISetBkColor(0xff00) GUISetState(@SW_SHOW) While WinExists($myVar1) Sleep(100) If Not WinExists($myVar1) Then Exit EndIf WEnd _EndTarget() #endregion Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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