forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Possible Bug: @mousedown()

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jan 15, 2003 10:34 pm    Post subject: Possible Bug: @mousedown() Reply with quote

The script below doesn't seem to work. I've check it over several times
and it still displays the message box when I've clicked on the left button. Confused

I'm probably overlooking the obvious.... Rolling Eyes

Code:
title Mouse Buttons
dialog create,Click on the Dialog Box,-1,0,240,160,click
dialog show
:evloop
wait event
goto @event()
:click
if @mousedown(R)
warn RIGHT mouse clicked!
end
goto evloop
:close
exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team


Last edited by FreezingFire on Thu Jan 16, 2003 12:20 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Wed Jan 15, 2003 11:11 pm    Post subject: Reply with quote

I don't use VDS 4...does mousedown have a return value?

%%mousedown = @mousedown(R)

if true return 1
else return 0

?

NodNarb
Back to top
View user's profile Send private message AIM Address
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jan 15, 2003 11:19 pm    Post subject: Reply with quote

Yes. Here's a quote from the help file:

Quote:
Syntax:

@mousedown(<flags>)

Description:

Flags are L, M, R. Default L. Returns the state of the mentioned mouse button. If the button is down, it returns 1, if not it returns NULL. When specifying more than one flag, the return is a string of null or 1 separated by the standard VDS field separator.

OK:

Not changed.

Copyright © 1995 - 2002 S.A.D.E. s.a.r.l. / All rights are reserved.


So using if @mousedown(R) should work. Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jan 15, 2003 11:20 pm    Post subject: Reply with quote

For some reason it's returning "R" instead of True or False..looks like a bug to me.
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jan 15, 2003 11:24 pm    Post subject: Reply with quote

I've moved this topic to BUG REPORTS. I think it's a bug.
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Wed Jan 15, 2003 11:31 pm    Post subject: Reply with quote

Verify:

Returns R on left and right mousedown?

NodNarb
Back to top
View user's profile Send private message AIM Address
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jan 15, 2003 11:36 pm    Post subject: Reply with quote

@mousedown(R) Returns "R", @mousedown(L) Returns "L" and @mousedown(M) returns "M" no matter which button is clicked..
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed Jan 15, 2003 11:37 pm    Post subject: Reply with quote

The function most certainly does not comply with the documentation, try this:

Code:

title Mouse Buttons
dialog create,Click on the Dialog Box,-1,0,240,160,click
dialog add,TEXT,T1,50,50,,,
dialog show
:evloop
wait event
goto @event()
:click
dialog set,T1,@mousedown(LMR)
goto evloop
:close
exit


Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Jan 15, 2003 11:47 pm    Post subject: Reply with quote

FF, your syntax is off:

if @mousedown(R)

is gonna return true on any mouse click - it only checks for
existance of a return. Ya need to use:

if @equal(@mousedown(R), "R")

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Jan 15, 2003 11:49 pm    Post subject: Reply with quote

But it returns R no matter which mouse button is clicked Mac.
Help file says it should return 1 or NULL anyway.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jan 16, 2003 12:10 am    Post subject: Reply with quote

All of this aside, I found I should probably be using the following code:

Code:
if @equal(@click(b),RIGHT)
dialog popup,Settings|Close
end


But there's still the question:

Why does the <a href="file:///c:\program files\visual dialogscript\examples\mousedown.dsc">examples\mousedown.dsc</a> example work correctly then? Confused

and why does it return the same letter no matter which button is clicked?

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Jan 16, 2003 12:17 am    Post subject: Reply with quote

Try this:

if @equal(@mousedown(LMR), "R")

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jan 16, 2003 12:17 am    Post subject: Reply with quote

OK, it's moved back to General Help because it's starting to look like a false
report. My syntax was off. Embarassed

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jan 16, 2003 12:19 am    Post subject: Reply with quote

Mac wrote:
if @equal(@mousedown(LMR), "R")


Thanks. Smile

I think both your example or the @click() example I found should fix my
problem. Wink

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Jan 16, 2003 12:28 am    Post subject: Reply with quote

Also - it's prolly like @event() - if ya need it more than
once ya better stick it in a var, and it may work better
in one anyway... Wink
Code:

%%test = @mousedown(LRM)
if @equal(%%test, "R")
   DIALOG SET, Stat, Right
end

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group