Jump to content

Recommended Posts

Sorry, that one is really my baby and not a part of the AutoIt project... I like to keep that one as is... If you have ?s, Iam glad to advise.

Lar.

Ok- why not share with us, so others can learn?

Or- can you giv eus an example, without giving away the farm?

Link to post
Share on other sites
  • Moderators

Ok- why not share with us, so others can learn?

Or- can you giv eus an example, without giving away the farm?

Anything specific you'd like to ask Larry cappy? 'Can you give us an example' is quite broad.

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.

Link to post
Share on other sites

If you use Scite4AutoIt3, then have a look in ....\SciTE\AutoItMacroGenerator folder for a Dll named MySpy021.dll. VoSs2o0o has supplied it as a nice make your own window info tool.

Here is the sample script below:

$Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, $WS_EX_TOPMOST)
GUISetIcon("..Res\AutoItMacroGenerator2.ico", 0)
$Edit1 = GUICtrlCreateEdit("", 5, 5, 190, 290, $ES_WANTRETURN + $ES_READONLY)

$Quit = 0
GUISetState()
Do
    $Msg = GUIGetMsg(1)
    $Mouse = MouseGetPos()
    $mySpy = DllOpen("MySpy021.dll")
    $PHWND = DllCall($mySpy, "hwnd", "AMG_GetPHWND", "long", $Mouse[0], "long", $Mouse[1])
    $HWND = DllCall($mySpy, "hwnd", "AMG_GetHWND", "long", $Mouse[0], "long", $Mouse[1])
    $Classname = DllCall($mySpy, "str", "AMG_GetClassname", "long", $Mouse[0], "long", $Mouse[1])
    $ClassCount = DllCall($mySpy, "long", "AMG_GetClassCount", "long", $Mouse[0], "long", $Mouse[1])
    $WinTitle = DllCall($mySpy, "str", "AMG_GetWinTitle", "long", $Mouse[0], "long", $Mouse[1])
    $WinText = DllCall($mySpy, "str", "AMG_GetWinText", "long", $Mouse[0], "long", $Mouse[1])
    $WinClass = DllCall($mySpy, "str", "AMG_GetWinClass", "long", $Mouse[0], "long", $Mouse[1])
    DllClose($mySpy)
    $data = $PHWND[0] & @CRLF & $HWND[0] & @CRLF & $Classname[0] & @CRLF & $ClassCount[0] & @CRLF & $WinTitle[0] & @CRLF & $WinText[0] & @CRLF & $WinClass[0]
    GUICtrlSetData($Edit1, $data)
    Select
        Case $Msg[0] = $GUI_EVENT_CLOSE And $Msg[1] = $Winmain
            $Quit = 1
    EndSelect
Until $Quit = 1
Link to post
Share on other sites

If you use Scite4AutoIt3, then have a look in ....\SciTE\AutoItMacroGenerator folder for a Dll named MySpy021.dll. VoSs2o0o has supplied it as a nice make your own window info tool.

Here is the sample script below:

$Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, $WS_EX_TOPMOST)
GUISetIcon("..Res\AutoItMacroGenerator2.ico", 0)
$Edit1 = GUICtrlCreateEdit("", 5, 5, 190, 290, $ES_WANTRETURN + $ES_READONLY)

$Quit = 0
GUISetState()
Do
    $Msg = GUIGetMsg(1)
    $Mouse = MouseGetPos()
    $mySpy = DllOpen("MySpy021.dll")
    $PHWND = DllCall($mySpy, "hwnd", "AMG_GetPHWND", "long", $Mouse[0], "long", $Mouse[1])
    $HWND = DllCall($mySpy, "hwnd", "AMG_GetHWND", "long", $Mouse[0], "long", $Mouse[1])
    $Classname = DllCall($mySpy, "str", "AMG_GetClassname", "long", $Mouse[0], "long", $Mouse[1])
    $ClassCount = DllCall($mySpy, "long", "AMG_GetClassCount", "long", $Mouse[0], "long", $Mouse[1])
    $WinTitle = DllCall($mySpy, "str", "AMG_GetWinTitle", "long", $Mouse[0], "long", $Mouse[1])
    $WinText = DllCall($mySpy, "str", "AMG_GetWinText", "long", $Mouse[0], "long", $Mouse[1])
    $WinClass = DllCall($mySpy, "str", "AMG_GetWinClass", "long", $Mouse[0], "long", $Mouse[1])
    DllClose($mySpy)
    $data = $PHWND[0] & @CRLF & $HWND[0] & @CRLF & $Classname[0] & @CRLF & $ClassCount[0] & @CRLF & $WinTitle[0] & @CRLF & $WinText[0] & @CRLF & $WinClass[0]
    GUICtrlSetData($Edit1, $data)
    Select
        Case $Msg[0] = $GUI_EVENT_CLOSE And $Msg[1] = $Winmain
            $Quit = 1
    EndSelect


Until $Quit = 1

Thanks!

Link to post
Share on other sites
  • 1 year later...

CODE
#Include "GUIConstants.au3"
$Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, $WS_EX_TOPMOST)
GUISetIcon("..Res\AutoItMacroGenerator2.ico", 0)
$Edit1 = GUICtrlCreateEdit("", 5, 5, 190, 290, $ES_WANTRETURN + $ES_READONLY)

$Quit = 0
GUISetState()
Do
    $Msg = GUIGetMsg(1)
    $Mouse = MouseGetPos()
    $mySpy = DllOpen("MySpy021.dll")
    $PHWND = DllCall($mySpy, "hwnd", "AMG_GetPHWND", "long", $Mouse[0], "long", $Mouse[1])
    $HWND = DllCall($mySpy, "hwnd", "AMG_GetHWND", "long", $Mouse[0], "long", $Mouse[1])
    $Classname = DllCall($mySpy, "str", "AMG_GetClassname", "long", $Mouse[0], "long", $Mouse[1])
    $ClassCount = DllCall($mySpy, "long", "AMG_GetClassCount", "long", $Mouse[0], "long", $Mouse[1])
    $WinTitle = DllCall($mySpy, "str", "AMG_GetWinTitle", "long", $Mouse[0], "long", $Mouse[1])
    $WinText = DllCall($mySpy, "str", "AMG_GetWinText", "long", $Mouse[0], "long", $Mouse[1])
    $WinClass = DllCall($mySpy, "str", "AMG_GetWinClass", "long", $Mouse[0], "long", $Mouse[1])
    DllClose($mySpy)
    $data = $PHWND[0] & @CRLF & $HWND[0] & @CRLF & $Classname[0] & @CRLF & $ClassCount[0] & @CRLF & $WinTitle[0] & @CRLF & $WinText[0] & @CRLF & $WinClass[0]
    GUICtrlSetData($Edit1, $data)
    Select
        Case $Msg[0] = $GUI_EVENT_CLOSE And $Msg[1] = $Winmain
            $Quit = 1
    EndSelect


Until $Quit = 1

i tried this script but it keeps showing "0" all the time ? why is that ?

btw - u forgot to add guiconstants.au3 to include

Edited by DaProgrammer
Link to post
Share on other sites

i tried this script but it keeps showing "0" all the time ? why is that ?

btw - u forgot to add guiconstants.au3 to include

Working for me. Try my test files. Just extract and run the script with support files within from a folder of it's own.

MySpy021.zip

post-2709-1183644524_thumb.png

:whistle:

Link to post
Share on other sites
  • 1 year later...

DaProgrammer

Line 18  (File "H:\1prog\Prg\AutoIT spy\MySpy.au3"):

  $Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, $WS_EX_TOPMOST)
  $Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, ^ ERROR

  Error: Variable used without being declared.

MHz

Line 2  (File "H:\1prog\Prg\AutoIT spy\MySpy021\Sample.au3"):

        $Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, $WS_EX_TOPMOST)
        $Winmain = GUICreate("MySpy 0.21", 200, 300, -1, -1, -1, ^ ERROR

        Error: Variable used without being declared.

use AutoIt v3.2.12.1

Edited by ai3uzr
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...