Jump to content



Photo

ANYGUI.au3


  • Please log in to reply
166 replies to this topic

#1 quaizywabbit

quaizywabbit

    picked the wrong day to quit sniffin' glue

  • Active Members
  • PipPipPipPipPipPip
  • 494 posts

Posted 16 March 2005 - 01:11 AM

For those of you who like to manipulate other program windows:

05 MAR, 2007 ANYGUIv2.8 Attached File  ANYGUIv2.8.au3   55K   7351 downloads

modified _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 by quaizywabbit, 04 September 2007 - 12:34 AM.

Do more with pre-existing apps!ANYGUIv2.8





#2 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 01:14 AM

i was trying to do this a few minutes ago, good job! :)

edit: i tryed it, but i can't get it to work :D here is my code
_GuiTarget ( "My Test" ) _TargetAddButton ( "Test", 3, 3, 50, 30 )

Edited by Xenogis, 16 March 2005 - 01:22 AM.

If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#3 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 01:30 AM

yes
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#4 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 01:44 AM

why isn't GUISetState(@SW_SHOW) in the functions?
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#5 myredeemerlives

myredeemerlives

    Adventurer

  • Active Members
  • PipPip
  • 132 posts

Posted 16 March 2005 - 01:47 AM

Woa, I so totally never thaught of this in my entire life. This is one hot tomally script. You go boy.

#6 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 01:48 AM

Yay, i got it to work. This is awesome.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#7 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 02:08 AM

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
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#8 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 02:41 AM

you can't, the functions don't return anything
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#9 Crome_BAD

Crome_BAD

    Prodigy

  • Active Members
  • PipPipPip
  • 179 posts

Posted 16 March 2005 - 12:48 PM

Do you NEED to have a target control when you use _GUITarget? In your example you use one, so i didnt know.

Crome

#10 SumTingWong

SumTingWong

    My custom member title

  • Active Members
  • PipPipPipPipPipPip
  • 360 posts

Posted 16 March 2005 - 01:24 PM

What's up doc?

#11 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 16 March 2005 - 02:41 PM

No you dont.
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#12 Crome_BAD

Crome_BAD

    Prodigy

  • Active Members
  • PipPipPip
  • 179 posts

Posted 16 March 2005 - 02:47 PM

Ok thank you much for your help!

Crome

#13 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 18 March 2005 - 02:59 PM

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.

#14 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 19 March 2005 - 12:11 AM

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.

#15 Insolence

Insolence

    Not distastefully arrogant

  • Active Members
  • PipPipPipPipPipPip
  • 1,304 posts

Posted 19 March 2005 - 01:28 AM

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.

#16 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 19 March 2005 - 05:47 AM

i prefer the targeting to speed up writing it but it would be extremely simple to do it without
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#17 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 20 March 2005 - 04:42 PM

you still don't have GuiShow() in the functions :)
If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#18 zcoacoaz

zcoacoaz

    Forever writing useless yet interesting scripts

  • Active Members
  • PipPipPipPipPipPip
  • 805 posts

Posted 21 March 2005 - 02:09 PM

oops i wasnt thinking i ment GuiSetState()

edit: grammer error

Edited by Xenogis, 21 March 2005 - 02:10 PM.

If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------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) ----------------------------------------------------------------------------------------------------------The newbies need to stop stealing avatars!!! It is confusing!!

#19 quaizywabbit

quaizywabbit

    picked the wrong day to quit sniffin' glue

  • Active Members
  • PipPipPipPipPipPip
  • 494 posts

Posted 21 March 2005 - 10:44 PM

Ya might have missed this post earlier.....


Left it out so other things like GUICtrlSetColor , GUICtrlSetImage , etc.....
can be inserted prior to calling GUIsetState()


Do more with pre-existing apps!ANYGUIv2.8

#20 DaleHohm

DaleHohm

    Think of IE as an API...

  • MVPs
  • 5,888 posts

Posted 22 March 2005 - 03:16 AM

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.

Dale
Plain Text         
#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

IE.au3 issues with Vista - Workarounds, Automate input type=file (Related)SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=YFree Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model,Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbeddedFind and harvest Enum constants for COM codeAutoIt Snippets Database - you too can contribute!Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your troubleDoesn'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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users