Sign in to follow this  
Followers 0
barrikid

Auto3Info

4 posts in this topic

I am wondering if there is the code for the Finder Tool in Auto3Info. I know that the author won't show his code, but if there is a snippet that is like that code.

Basically, I need a small box like the Finder tool which you click, drag it over to a location, release the mouse, and then it would save the location. Mainly I don't know how to find when the mouse is released, and also I don't know what he used for the GUI

Thanks,

BK

Share this post


Link to post
Share on other sites



I have not seen the source however I created something like it called 'Control Handle under mouse' which you can find in my sig.

There is a freeze function in the Info Tool so it only works when you are moving the target, not the mouse. That may do what you wish.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

barrikid,

You do not need the Au3Info code - this is really easy to code in AutoIt itself: :)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$hGUI = GUICreate("Position Test", 220, 50)

$hLabel = GUICtrlCreateLabel("", 10, 10, 100, 30)
GUICtrlSetFont(-1, 18)

GUISetState()

$hChild = GUICreate("X", 5, 5, -1, -1, BitOR($WS_POPUP,$WS_BORDER), $WS_EX_TOPMOST, $hGUI)
GUICtrlCreateLabel("", 0, 0, 5, 5, -1, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor(-1, 0x00FF00)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $GUI_EVENT_PRIMARYUP
            $aMpos = MouseGetPos()
            GUICtrlSetData($hLabel, $aMpos[0] & "x" & $aMpos[1])
    EndSwitch
WEnd

Just click on the small green GUI and drag it - when you let go of the mouse button, the mouse coordinates appear on the GUI. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

$hGUI = GUICreate("Posit ...

This is pretty interesting, definitely a step forward

Thanks,

BK

Edited by barrikid

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