Jump to content
Sign in to follow this  
quaizywabbit

ANYGUI.au3

Recommended Posts

Share this post


Link to post
Share on other sites

@quaizywabbit

This is still one of my favourites !! :whistle:

Thanks for sharing

One small remark for those using the UDF, it only works with the BETA.

Not with the 3.2.0.1 release.

regards

ptrex

current production release is 3.2.2.0

if there are any issues with this release, please let me know.........


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Hmm, this is weird.

Can anyone see anything wrong with this?

I can't get the button to show.

Also though I can't figure out why, when I use $targetID it throws an error.

I wonder if I am having a blond moment?

CODE

$button = _ArrayCreate("")

$target = 0

Func makeButton()

$targetWin = IniRead("settings.ini","Button Options","windowTitle","Edit Database Item")

$targetID = IniRead("settings.ini","Button Options","toolbarID","132846")

$targetIDX = IniRead("settings.ini","Button Options","tolbarIDX","429")

$targetIDY = IniRead("settings.ini","Button Options","toolbarIDY","26")

$targetIDW = IniRead("settings.ini","Button Options","toolbarIDW","52")

$targetIDH = IniRead("settings.ini","Button Options","toolbarIDH","21")

$target = _GuiTarget($targetWin, "", "", $targetID)

Global $button = _TargetaddButton("Import",$targetIDX,$targetIDY,$targetIDW,$targetIDH,-1,-1, $target)

GUISetState(@SW_SHOW)

EndFunc

makeButton()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $button[0]

newSearch()

Case $msg = $GUI_EVENT_CLOSE

Exit

Case Not WinExists($target)

makeButton()

EndSelect

WEnd

Share this post


Link to post
Share on other sites

Hmm, this is weird.

Can anyone see anything wrong with this?

I can't get the button to show.

Also though I can't figure out why, when I use $targetID it throws an error.

I wonder if I am having a blond moment?

CODE

$button = _ArrayCreate("")

$target = 0

Func makeButton()

$targetWin = IniRead("settings.ini","Button Options","windowTitle","Edit Database Item")

$targetID = IniRead("settings.ini","Button Options","toolbarID","132846")

$targetIDX = IniRead("settings.ini","Button Options","tolbarIDX","429")

$targetIDY = IniRead("settings.ini","Button Options","toolbarIDY","26")

$targetIDW = IniRead("settings.ini","Button Options","toolbarIDW","52")

$targetIDH = IniRead("settings.ini","Button Options","toolbarIDH","21")

$target = _GuiTarget($targetWin, "", "", $targetID)

Global $button = _TargetaddButton("Import",$targetIDX,$targetIDY,$targetIDW,$targetIDH,-1,-1, $target)

GUISetState(@SW_SHOW)

EndFunc

makeButton()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $button[0]

newSearch()

Case $msg = $GUI_EVENT_CLOSE

Exit

Case Not WinExists($target)

makeButton()

EndSelect

WEnd

you forgot your #includes...........so far anyways.....

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

oh, no I just didn't want to post the whole file yet, so I just posted the part that isn't working.

You mean the part that no one can run to see what your issue actually is?

Try posting a scaled down version ... something less than 50 lines that replicates your issue that anyone can test.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

You mean the part that no one can run to see what your issue actually is?

Try posting a scaled down version ... something less than 50 lines that replicates your issue that anyone can test.

Sorry, I should have tested it. Laziness never is worth it :whistle:

CODE
#include <ANYGUI.au3>

#include <array.au3>

$button = _ArrayCreate("")

$target = 0

Func makeButton()

$targetWin = IniRead("settings.ini","Button Options","windowTitle","Edit Database Item")

$targetID = IniRead("settings.ini","Button Options","toolbarID","132846")

$targetIDX = IniRead("settings.ini","Button Options","tolbarIDX","429")

$targetIDY = IniRead("settings.ini","Button Options","toolbarIDY","26")

$targetIDW = IniRead("settings.ini","Button Options","toolbarIDW","52")

$targetIDH = IniRead("settings.ini","Button Options","toolbarIDH","21")

$target = _GuiTarget($targetWin, "", "", $targetID)

Global $button = _TargetaddButton("Import",$targetIDX,$targetIDY,$targetIDW,$targetIDH,-1,-1, $target)

GUISetState(@SW_SHOW)

EndFunc

makeButton()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $button[0]

;~ newSearch()

Case $msg = $GUI_EVENT_CLOSE

Exit

Case Not WinExists($target)

makeButton()

EndSelect

WEnd

Share this post


Link to post
Share on other sites

I think you misunderstand what I'm saying. No one can test your code to help you.

You have IniRead() there, but provided no Ini?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I think you misunderstand what I'm saying. No one can test your code to help you.

You have IniRead() there, but provided no Ini?

The defaults there are correct. It's made to work with the program Easislides, but to be easily modified to work with other programs without me having to do another build.

I was hoping it would be an obvious problem but apparently not.

Share this post


Link to post
Share on other sites

Obvious or not, you need to make it easy for someone to copy your code and test it without modification -- this is called "creating a reproducer". You will get much more help when you do this. I.e. YOU do the work so that we can easily test your code -- instead of asking each kind soul you are asking to donate their time to study your code and rewrite it just to be able to BEGIN to help you. It shows respect for other people's time and shows that you are likely serious about wanting to learn rather than just asking someone to rewrite code for you.

Dale


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

Share this post


Link to post
Share on other sites

make sure your 'Edit Database Item' window exists and run this...

#include <ANYGUIv2.8.au3>
Dim $coords[2] 
$coords[0] = 200  ;point x to check in CLIENT COORDS
$coords[1] = 29;point y to check in CLIENT COORDS
$Ctrltarget = _GuiTarget("Edit Database Item", "", "", $coords)
$btn = _TargetaddButton("testing", 480, 0, 40, 25, -1, -1, $Ctrltarget)
GUISetState(@SW_SHOW, $btn)
While WinExists("EasiSlides")
 $msg = GUIGetMsg()
 Select
  Case $msg = $btn[0]
   MsgBox(4096, "btn clicked", "You clicked the anygui button")
  Case Not WinExists("Edit Database Item") 
   Exit
 EndSelect
 WEnd

I modded _GuiTarget( ) to also accept an array in the ControlId param (see example above)

re-released as ANYGUIv2.8

see first post or click my sig.....


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Obvious or not, you need to make it easy for someone to copy your code and test it without modification -- this is called "creating a reproducer". You will get much more help when you do this. I.e. YOU do the work so that we can easily test your code -- instead of asking each kind soul you are asking to donate their time to study your code and rewrite it just to be able to BEGIN to help you. It shows respect for other people's time and shows that you are likely serious about wanting to learn rather than just asking someone to rewrite code for you.

Dale

Yea, I know, I assumed it was something simple so I just copied the part that wasn't working and posted it. I will make sure it runs from now on.

make sure your 'Edit Database Item' window exists and run this...

#include <ANYGUIv2.8.au3>
Dim $coords[2] 
$coords[0] = 200  ;point x to check in CLIENT COORDS
$coords[1] = 29;point y to check in CLIENT COORDS
$Ctrltarget = _GuiTarget("Edit Database Item", "", "", $coords)
$btn = _TargetaddButton("testing", 480, 0, 40, 25, -1, -1, $Ctrltarget)
GUISetState(@SW_SHOW, $btn)
While WinExists("EasiSlides")
 $msg = GUIGetMsg()
 Select
  Case $msg = $btn[0]
   MsgBox(4096, "btn clicked", "You clicked the anygui button")
  Case Not WinExists("Edit Database Item") 
   Exit
 EndSelect
 WEnd

I modded _GuiTarget( ) to also accept an array in the ControlId param (see example above)

re-released as ANYGUIv2.8

see first post or click my sig.....

Yup that did it :whistle: Thanks a lot.

It is almost all done now, except for a few bug fixes.

Share this post


Link to post
Share on other sites

glad to have helped.....interesting piece of software....are you a minister?

No, but I run the projectors at my church.

Anyway, it's finished, hopefully there won't have to be too many versions after this one :whistle:

Share this post


Link to post
Share on other sites

I used AutoIt 3 about 1-2 years ago, but haven't used it since then.

I seem to remember a script that allowed the user toe enable controls in a target app, that were disabled (Greyed out).

Does anyone remember this?

Was this AnyGui- or am I in the wrong forum? :-)

Edited by cappy2112

Share this post


Link to post
Share on other sites

I used AutoIt 3 about 1-2 years ago, but haven't used it since then.

I seem to remember a script that allowed the user toe enable controls in a target app, that were disabled (Greyed out).

Does anyone remember this?

Was this AnyGui- or am I in the wrong forum? :-)

HelpFile... Control + Enable = http://www.autoitscript.com/autoit3/docs/f...ntrolEnable.htm

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

When using AUTO3lib in conjunction with ANYGUI

when compiling

C:\PROGRA~1\AutoIt3\Include\A3LConstants.au3 (762) : ==> Can not redeclare a constant.:

Global Const $SWP_NOSIZE = 0x0001

In anygui ligne 1003

Const $SWP_NOMOVE = 0x0002, $SWP_NOSIZE = 0x0001, $SWP_NOZORDER = 0x0004, $SWP_FRAMECHANGED = 0x0020

Others request

where is the file guilist.au3 ?

Share this post


Link to post
Share on other sites

When using AUTO3lib in conjunction with ANYGUI

when compiling

C:\PROGRA~1\AutoIt3\Include\A3LConstants.au3 (762) : ==> Can not redeclare a constant.:

Global Const $SWP_NOSIZE = 0x0001

In anygui ligne 1003

Const $SWP_NOMOVE = 0x0002, $SWP_NOSIZE = 0x0001, $SWP_NOZORDER = 0x0004, $SWP_FRAMECHANGED = 0x0020

Others request

where is the file guilist.au3 ?

This is going to be your responsibility to comment those out. You are running 2 different UDFs from 2 different users, and both are needed by both UDFs, not everyone uses both #includes at the same time. Or you might consider just adding them to your standard Constants.au3 and removing them from both Includes.

My GUIList.au3 is in my /AutoIt3/Include file :whistle: .

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...