Mouse Problems

Started by BooBoo, March 29, 2010, 08:52:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lonewolf10


I'll look into the workbench side of things. I'm sure it must be possible, just not easy :(
Thanks for your input anyway, SamuraiCrow.


Regards,
Lonewolf10


skateblind

#16
On a similar note, has anybody ever got Mouse Click to work? I cannot get any values from it other than %00000000. Horace said he has never got it working either. I have tried testing it with BTST and printing out its values with bin$ and I still get nothing. Mouse Key works fine, but I would have to write a bunch of code to get it to operate like Mouse Click.
What are you looking at?

BooBoo

Is mouse Click just for a single press?

Anyways probably not much help to you Skate

Do
M=Mouse Click
If M<>0 then Print M
Loop

Is there anyway of reading Second Fire button port 1?

Lonewolf10

I'm not sure whether I have ever used Mouse Click or not, but here are some alternatives that I have found by a quick search of the Extension Commands file I created (it should be linked to, or mentioned on the forum somewhere):


Delta v1.4 mouse commands

Delta Wait Double Mouse X         | Wait for double-click of left mouse button
Delta Wait Fire                         | Wait for fire button (J0?) to be pressed
Delta Wait Left Mouse               | Wait for left mouse button to be pressed


GUI V2.1  has multiple mouse commands for workbench based mouse work.

Craft v1.00

=Hw Mouse Key | Returns the status of the mouse key, even when AMOS is put 'to back' (eg. Amos To Back).

JD Extension v5.9

=Jd Moff Click                   | Returns a value depending on which mouse buttons are
                                     | pressed (works even after Jd Multi Off has been used).
                                     |   0=No mouse buttons
                                     |   1=Left mouse button
                                     |   2=Right mouse button
                                     |   3=Both mouse buttons

Intuition v1.0

=Wb Mouse Key                | Returns the state of the left mouse key.
                                     |   -1  Left mouse key unpressed
                                     |    1  Left mouse key pressed


Anyway, the file is currently here:
http://www.geocities.com/aliensrcooluk/public/AMOS_ExtCommands.txt


@ SamuraiCrow: The intuition extension has mouse commands that return the exact position of the workbench mouse. I'm not sure I can use the extension with my setup, but it must be possible to retrieve the coords of the WB mouse in AMOS :)



Regards,
Lonewolf10


skateblind

#19
Quote from: BooBoo on April 16, 2010, 08:03:53 PM
Is mouse Click just for a single press?

Anyways probably not much help to you Skate

Do
M=Mouse Click
If M<>0 then Print M
Loop

Is there anyway of reading Second Fire button port 1?

BooBoo, did you actually try run that bit of code you posted? I tried all the bits of code in the manual and none of it worked.
You need an extension to read the second fire button. AMCAF will do the job, http://amos.condor.serverpro3.com/AMCAFguide/manual/gameadapter.html#xfire.
Joystick talk is for a different thread though.


@lonewolf10, thanks for the help, I would prefer to use MOUSE CLICK rather than installing more extensions, but it looks like I will have to do that if I want a proper single click check. Mouse Key does the job, but if you hold the mouse button down and move over the area that is checking for mouse data, then it activates it. For the purpose I intend to use it for, I would prefer a single click so that the user does not accidentally press a button.
What are you looking at?

Hungry Horace

i'm sure you can get around the problem by using mouse click to check for both 'on' and 'off' status, checking that both are done whilst still over the zone you require.

perhaps, only checking the click once you are on the zone you want is the way forward?
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


BooBoo

Yes the code worked but im using Amos Creator ???

I had a similar problem with the Joystick
http://amos.condor.serverpro3.com/index.php/topic,158.0.html
Overclocked deleted his post but im sure it worked and maybe it would work on Port 0, Im not sure I have the code he gave me anymore :(

Is there no way to read second button without an extension - Like reading the mouse in Port 1?

Ive made another scrolling Demo using offset if anyone gets a chance please could they test and maybe give me feedback on speed etc - It runs very fast on my A1200/030

Arrow keys change speed.

http://rapidshare.com/files/376923558/Scroll.zip.html

Lonewolf10


Quote from: skate on April 17, 2010, 01:55:52 AM

@lonewolf10, thanks for the help, I would prefer to use MOUSE CLICK rather than installing more extensions, but it looks like I will have to do that if I want a proper single click check. Mouse Key does the job, but if you hold the mouse button down and move over the area that is checking for mouse data, then it activates it. For the purpose I intend to use it for, I would prefer a single click so that the user does not accidentally press a button.


Can't you detect and save the mouse position when the mouse button is first used? That way you don't get buttons pressed accidentally.


Quote from: BooBoo

Is there no way to read second button without an extension - Like reading the mouse in Port 1?


I have tried to look it up in the Amiga Hardware Reference Manual, but found no useful info (unless someone knows where pin 9 (button 2), or pin 5 (button 3) data is stored). The button 1 (left mouse button) data is stored in the CIAAPRA ($BFE001) - bit #6 for port 1 and bit #7 for port 2.


Regards,
Lonewolf10


Hungry Horace

i fixed skate's problem with the following code:

GUI:
  ' much shorter code for checking button (zone) clicks :)  (HH)

       If Mouse Key=1 and MOUSEHELD=-1 : Rem -  LMB only

           JUMPTO$="LMBZONE"+Right$(Str$(Mouse Zone+100),2)
           Gosub JUMPTO$

  Else If Mouse Key=2 and MOUSEHELD=-1 : Rem - RMB only

  Else If Mouse Key=3 and MOUSEHELD=-1 : Rem - RMB + LMB together

  End If

  ' check if we just did something, and are still holding the mouse
       If Mouse Key<>0
         MOUSEHELD=Mouse Zone
       Else
          MOUSEHELD=-1
       End If
Return

' GOSUBs for different zones (you will need empty ones for any zones)

LMBZONE00:
Return
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


Lonewolf10

Quote from: BooBoo on April 17, 2010, 01:08:41 PM

Ive made another scrolling Demo using offset if anyone gets a chance please could they test and maybe give me feedback on speed etc - It runs very fast on my A1200/030

Arrow keys change speed.

http://rapidshare.com/files/376923558/Scroll.zip.html

That's a neat scroll there. It going on going and going, until it ran out of data(?) and then it kept on going!! Perhaps you have it running on Energiser batteries?!!

BTW, I was running it on WinUAE 2.0.1, set for the A600.


Regards,
Lonewolf10


BooBoo

Thanks :) -Yeah I wanted to check if it just crawls on 68000, Im not sure WinUae will give me a true idea -ill have to drag out my A600.

Glad that everyone got there Mouse problems sorted :)