Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
174 user(s) are online (159 user(s) are browsing Forums)

Members: 2
Guests: 172

Petrol, jabirulo, more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
Need help BougeSouris
Just popping in
Just popping in


See User information
hello,

Zzd10h to create BougeSouris command to my remote project AmigaOs4.x
BougeSouris moves the mouse pointer and the left button to open folders and launch applications.

The problem is that the left mouse button does not close the window, it does not work.
Zzd10h find no solution to this little problem.

We need the help of a developer to find a solution.

Thank you in advance for your help

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@sinisrus

I have to clarify that to send a SELECTDOWN / SELECTUP on a Close gadget works well on
-Qt window (tested with SMTube)
-Reaction window (tested with Notepad and Ranger)
-MUI window (tested with Odyssey and SysMon)

It seems that it doesn't work only on Workbench drawer window.

For example, download BougeSouris on OS4Depot


1) open a drawer and precisely put it in the upper left of your screen.

2) in a Shell, type "BougeSouris X=18 Y=14 CLICK" to hit the Close gadget

3) the close gadget blink but the drawer window doesn't close

4) now, put the window of a program in the same place (for example YAM)

5) retype the same BougeSouris command

6) YAM will close it.



BougeSouris with sources available here :
http://www.os4depot.net/?function=sho ... lity/misc/bougesouris.lha

To simulate a Click, BougeSouris send

FakeEvent->ie_EventAddress=NULL;
FakeEvent->ie_Class=IECLASS_RAWMOUSE;
FakeEvent->ie_Code=IECODE_LBUTTON  ;
                            
InputIO->io_Data    = (APTR)FakeEvent;    
InputIO->io_Length  sizeof(struct InputEvent);
InputIO->io_Command IND_WRITEEVENT;
DoIO((struct IORequest *)InputIO);
                             
FakeEvent->ie_EventAddress=NULL;
FakeEvent->ie_Class=IECLASS_RAWMOUSE;
FakeEvent->ie_Code=SELECTUP;
                            
InputIO->io_Data    = (APTR)FakeEvent;    
InputIO->io_Length  sizeof(struct InputEvent);
InputIO->io_Command IND_WRITEEVENT;
DoIO((struct IORequest *)InputIO);


As mentionned in the readme :
The move mouse pointer function is based on source find here :
http://www.theflatnet.de/pub/cbm/amig ... /dev_examples/set_mouse.c

Thank you

Go to top
Re: Need help BougeSouris
Amigans Defender
Amigans Defender


See User information
If you're manipulating WB windows, isn't it better to use ARexx, rather than fake mouse events?

Go to top
Re: Need help BougeSouris
Just popping in
Just popping in


See User information

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@Chris
From withing a C program it might be better to use workbench.library and use WhichWorkBenchObject() to get the name of the window under the pointer and CloseWorkBenchObject() to close it. However, I don't know how Workbench would determine which window to close if 2 windows have the same name.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
The goal of the program is to move a cursor and sometimes to click on the screen.

If the cursor hit on a close gadget, it should close the window.
The goal is not to close a window as soon as the cursor click inside a workbench window, in this case, yes. whichworkbenchobject could have been helpful.

The problem is why it works for all the windows type except workbench drawers.

Thank you ;)

Go to top
Re: Need help BougeSouris
Supreme Council
Supreme Council


See User information
It doesn't look to me like you are sending enough information. I would expect to see a SELECTDOWN before a SELECTUP at the very least.

Simon

Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such.
----
http://codebench.co.uk
Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@Rigo
In the video than Sinisrus posted, it uses a

FakeEvent->ie_Code=SELECTDOWN ;

instead of the

FakeEvent->ie_Code=IECODE_LBUTTON  ;

before the

FakeEvent->ie_Code=SELECTUP;

but it doesn't make a difference. It still fails ONLY for wb drawers.

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@zzd10h
Quote:

In the video than Sinisrus posted, it uses a

FakeEvent->ie_Code=SELECTDOWN ;

SDK:Include/include_h/intuition/intuition.h defines SELECTDOWN as (IECODE_LBUTTON) so they are presumably the same value.

Strangely, the WorkBench drawer window is deactivated when it receives the gadget up message and another Workbench window is activated just like what happens when a Workbench drawer window is closed. It's as though Workbench thinks the window was closed.



Edited by xenic on 2014/10/29 13:41:56
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Need help BougeSouris
Just popping in
Just popping in


See User information
@All

thank you for your help

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
Hi, try to change/add in 'void actionClick(void)':
FakeEvent->ie_EventAddress NULL;
FakeEvent->ie_Class        IECLASS_RAWMOUSE;
FakeEvent->ie_Code         IECODE_LBUTTON;
FakeEvent->ie_Qualifier    IEQUALIFIER_RELATIVEMOUSE|IEQUALIFIER_LEFTBUTTON;
InputIO->io_Data    = (APTR)FakeEvent;
InputIO->io_Length  sizeof(struct InputEvent);
InputIO->io_Command IND_WRITEEVENT;
DoIO( (struct IORequest *)InputIO );

FakeEvent->ie_EventAddress NULL;
FakeEvent->ie_Class        IECLASS_RAWMOUSE;
FakeEvent->ie_Code         IECODE_LBUTTON|IECODE_UP_PREFIX;//SELECTUP;
FakeEvent->ie_Qualifier    IEQUALIFIER_RELATIVEMOUSE|IEQUALIFIER_LEFTBUTTON;
InputIO->io_Data    = (APTR)FakeEvent;
InputIO->io_Length  sizeof(struct InputEvent);
InputIO->io_Command IND_WRITEEVENT;
DoIO( (struct IORequest *)InputIO );


FakeEvent->ie_Qualifier    = IEQUALIFIER_RELATIVEMOUSE|IEQUALIFIER_LEFTBUTTON;
and maybe
IECODE_LBUTTON|IECODE_UP_PREFIX; isn't necessary (just stay with your original SELECTUP tag)

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@jabirulo

Thank you Javier,
I will try tomorrow, did you tested it ? Did it fails for you too before to change the code ?


Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@zzd10h

yep it failed too here on latest beta. but with 'ie_Qualifier' seems working fine

All thx should go too rmouse.lzx (sources included) from os4depot.
http://www.os4depot.net/share/driver/input/rmouse.lzx

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@jabirulo
Youpi, you are great !
I will test tomorrow. Thank you

Go to top
Re: Need help BougeSouris
Home away from home
Home away from home


See User information
@zzd10h

Jabirulo is correct you need to take care of the qualifier, you were not setting at all which will might result in random results, but in any event no qualifier has a specific value which is not simply zero.


Try this little test, press shift and click the window close gadget of a workbench window, it deactivates and doesn't close. In fact the parent activates / opens.


I'm not sure that IEQUALIFIER_LEFTBUTTON is correct on the second 'SELECTUP' event, after all the left mouse button is no longer pressed.

BTW you can uses ADDEVENT rather than WRITEEVENT for RAWMOUSE and RAWKEY events on OS4 it's more efficient.


Go to top
Re: Need help BougeSouris
Home away from home
Home away from home


See User information
@xenic
Quote:

Strangely, the WorkBench drawer window is deactivated when it receives the gadget up message and another Workbench window is activated just like what happens when a Workbench drawer window is closed. It's as though Workbench thinks the window was closed.


Odds are that drawer was the parent of the one you clicked

Because the qualifier wasn't being set properly a SHIFT was being added activate the little know open parent function.


Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@Broadblues
You are right, pressing SHIFT during close have the same behaviour that BougeSouris without the ie_Qualifier that Javier spotted.

Fabien, on Amiga-NG.org still adviced me to add IND_ADDEVENT. It fixed the issue on SAM440 & SAM460 but not on X1000. Therefore it was maybe a piece of luck ;)

But now, IND_ADDEVENT + ie_Qualifier => it works very well.

Thank you for your help !

Go to top
Re: Need help BougeSouris
Just popping in
Just popping in


See User information
Thank you

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information

Go to top
Re: Need help BougeSouris
Just can't stay away
Just can't stay away


See User information
@zzd10h
@sinusrus


Is it possible to know the position of the active window's system gadgets ?
How?

Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project