Sign in to follow this  
Followers 0
Flamingwolf

MousePos

11 posts in this topic

#1 ·  Posted (edited)

bleh. quick program i made to display the mouse position. it constantly updates so i made it stay above everything. have fun.

dont trust me? simple solution, dont download it. [would post the source, but i reformatted. it was a quick project i threw together for my friend]

heres a quick source i threw together, basically the same thing

#include <GUIConstants.au3>

Global $mousex
Global $mousey
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate(".:[Quick Mouse Pos Finder]:.", 197, 33, 400, 408, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST))
$Label1 = GUICtrlCreateLabel("0,0", 0, 8, 196, 17, $SS_CENTER)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    sleep(5)
    $mousex = MouseGetPos(0)
    $Mousey = MouseGetPos(1)
    GUICtrlSetData($label1, "")
    GUICtrlSetData($Label1, $mousex & ", " & $mousey)
WEnd

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

mousepos.exe

Edited by Flamingwolf

Share this post


Link to post
Share on other sites



Source?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

would post the source, but i reformatted. it was a quick project i threw together for my friend. edit: ill make a quick version again for all you non-trusting pplx

Edited by Flamingwolf

Share this post


Link to post
Share on other sites

Hmm... i notice you constantly re-create the label. Wouldn't it be easier to just GUICtrlSetData() instead of making thousands of Labels?

Share this post


Link to post
Share on other sites

sjees its so difficult :| :whistle:

while 1
$pos = mousegetpos()
traytip("Mouse Pos","X:"&$pos[0]&" Y:"&$pos[1],"")
wend

while 1
     If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe")
wend
[size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]

Share this post


Link to post
Share on other sites

sjees its so difficult :| :whistle:

while 1
$pos = mousegetpos()
traytip("Mouse Pos","X:"&$pos[0]&" Y:"&$pos[1],"")
wend
meh, felt like putting it somewhere. just incase someone needs it and doesnt feel like doing much work :)

Share this post


Link to post
Share on other sites

meh, felt like putting it somewhere. just incase someone needs it and doesnt feel like doing much work :whistle:

ok :) no offense


while 1
     If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe")
wend
[size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]

Share this post


Link to post
Share on other sites

k, and @D - im not making new labels, its GUICtrlSetData, its kinda buggy if you put it in a loop with a small delay [i used a small delay so it would constantly update]

Share this post


Link to post
Share on other sites

would post the source, but i reformatted. it was a quick project i threw together for my friend. edit: ill make a quick version again for all you non-trusting pplx

You compiled the script without setting a password or disabling decompilation, so people can just use Exe2Auto to get the source.

Also, like D-Generation X said...why do you recreate the label when you can just update it using GUICtrlSetData... The odd part

is that you recreate the label and then two lines below you clear the text on it using GUICtrlSetData. Why not use that function to

update the label-text instead of putting another control over the previous ? Not only is this very logical, but it will also make your

script avoid the maximum control-limit for a GUI (4093).

k, and @D - im not making new labels, its GUICtrlSetData...

No, you do both.

While 1
    $x = MouseGetPos(0)
    $y = MouseGetPos(1)
    $Label1 = GUICtrlCreateLabel($x & ", " & $y, 0, 0, 181, 17, $SS_CENTER)
    sleep(200)
    GUICtrlSetData($Label1, "")
Wend

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

I took a look at your source and in the While loop, you have both GUICtrlCreateLabel AND GUICtrlSetData

EDIT: Helge beat me to it

Edited by D-Generation X

Share this post


Link to post
Share on other sites

oh idk i did that like a while ago. the new one i did just clears the label and sets it again.

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