Jump to content

GUIGetCursorInfo()


Recommended Posts

So I am trying to use GUIGetCursorInfo() But All I get is 0 Shouldn't it be something else. What would cause this. How Do I check for an error to see why it sees a 0

If you need the Entire code Let me know But it just isn't working

I am trying to make my own slider and the script I used before isn't allowing this into the new Script

Link to comment
Share on other sites

  • Moderators

But why would the cursor info com back with a 0?

wtf are you talking about?

Return Value

Failure: 0 and set @error to 1

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.

Link to comment
Share on other sites

  • Moderators

When I Use GUIGetCursorInfo() And use a tooltip to tell me if the array is there IE 0 & 1 All I see is 0 I should see a 1

If you bother to open the help file and read... you'll see the return is 0 for a "hard value" or the return is an array, since I doubt very seriously you're even bothering to check for an array, the return would always be 0 or blank.

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 comment
Share on other sites

  • Moderators

Here is my Full Code though it is messy and I haven't Cleaned up the spot's I am working on.

I read the Help File it is open all the time.

You can't really think anyone is going to go through 650 lines of code for you (if they do they are an idiot).

Make a recreation script (50 lines or smaller) that replicates the error you are getting.

Other than that, I've told you the return values, and how to check them.

Edit:

Although:

"Inside The Magic" is not a Window "Handle" as GUIGetCursorInfo() requires... and are you trying to find where the cursor is in a GUI other than an AutoIt gui?

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.

Link to comment
Share on other sites

Here is the Code I am using

#301419

I am trying to make a simple Ball and Bar as my volume Slider.

I have squeezed that code into the Script I put above and it doesn't work. I could Rewrite the Entire thing but the script above works fine it is just the Volume slider using 2 pictures.

Smoke I notice some of your other Post within the last few Minutes are Negative (and not just to me). I hope your Day/Night is better and if Something is bugging you I am sorry. I am trying I have been stuck on this 1 problem for 3 days and just wanted to change the way the very basic volume slider looks

Link to comment
Share on other sites

  • Moderators

Smoke I notice some of your other Post within the last few Minutes are Negative (and not just to me). I hope your Day/Night is better and if Something is bugging you I am sorry. I am trying I have been stuck on this 1 problem for 3 days and just wanted to change the way the very basic volume slider looks

I'm only negative when people take things for granted.

Check the edit I made above... I personally am not going through 640 lines of code... but the last few lines, I did see the error I stated above.

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 comment
Share on other sites

I love AutoIt it has saved me so many times. I did see that the Inside the Magic was not the Gui I was using. I understand the issue with going through the Huge Code Sorry. Saying that. Changing the Gui into IE "Inside The Magic" to "SubsonicRadio.com" does not change the fact that it isn't working. What would cause the Curse info not to work right. Could it be something I have done in the Beginning that does show the cursor info just right?.

Edited by eagle4life69
Link to comment
Share on other sites

  • Moderators

I love AutoIt it has saved me so many times. I did see that the Inside the Magic was not the Gui I was using. I understand the issue with going through the Huge Code Sorry. Saying that. Changing the Gui into IE "Inside The Magic" to "SubsonicRadio.com" does not change the fact that it isn't working. What would cause the Curse info not to work right. Could it be something I have done in the Beginning that does show the cursor info just right?.

Again... Before you respond... (I'm bad about it myself) read what I wrote.

You CANNOT use a Window "Title" for GUIGetCursorInfo(). It must be a "Handle".

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 comment
Share on other sites

  • Moderators

While $msg3[2] = 1
            Sleep(10)
            Select
                Case ($msg3[0] - $offset) < 265
                    GUICtrlSetPos($ball,265,110)
                    $pos = 260
                Case ($msg3[0] - $offset) > 365
                    GUICtrlSetPos($ball,365,110)
                    $pos = 360
                Case Else
                    If $pos Then
                        $v = $pos-270
                    $oMediaPlaySettings.Volume = $v
                    EndIf
                    ;Tooltip($pos)
                    GUICtrlSetPos($ball,($msg3[0]-$offset),110)
                    $pos = $msg3[0]-$offset
            EndSelect
            ;$msg3 = GUIGetCursorInfo("Inside The Magic")
        WEnd
        $aCursor = GUIGetCursorInfo("THERE MUST BE A WINDOW HANDLE HERE")
        If IsArray($aCursor) Then
            ;If $aCursor[0] = whatever
            ;If $aCursor[1] = whatever
            ;etc....
            ;There must be a condition
        EndIf

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.

Link to comment
Share on other sites

What Smoke_N is trying to say is this:

$a_CurPos = GUIGetCursorInfo(WinGetHandle ( "title" ))oÝ÷ Øíá#¬r·µçb«­¢+r¢ì(ºW]¢Øb±«­¢+ØÀÌØí!}5¥¹U%!¹±ôU%
ÉÑ ¤)U%MÑMÑÑ ¤((ÀÌØí}
ÕÉA½ÌôU%Ñ
ÕÉͽÉ%¹¼ ÀÌØí!}5¥¹U%!¹±¤

This is psuedo code, you acutally have to have the function parameters filled out for this to work.

- The Kandie Man ;-)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...