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 


@dlgtext(button1) bug?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Jan 31, 2003 9:48 pm    Post subject: @dlgtext(button1) bug? Reply with quote

Hi all,

is this a bug or am i doing something wrong - running Windows ME and VDS 4.5?

if i have a button called BUTTON1 with a caption UPGRADE, then this code gives me an error:

Code:
if @equal(@dlgtext(button1),upgrade)


the error part seems to be that @DLGTEXT is not able to read the caption of my button...my understanding was that i could use @DLGTEXT to do that...

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Jan 31, 2003 10:05 pm    Post subject: Reply with quote

I ran into this bug awhile back also. It's been discussed at
http://www.vdsworld.com/forum/viewtopic.php?t=1031&start=15

but it was never posted in the "Bug Reports" section. But as mentioned
in the thread listed above you can use a @sendmsg() instead. 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: Fri Jan 31, 2003 10:10 pm    Post subject: Reply with quote

You can also use @wintext()... Wink
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,300,200
  DIALOG ADD,BUTTON,B1,5,5,60,24,"Test"
DIALOG SHOW

:EVLOOP
  WAIT EVENT
  goto @event()

:B1BUTTON
  INFO @wintext(@winexists(~B1))
  goto EVLOOP

:CLOSE
  EXIT

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
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sat Feb 01, 2003 2:24 am    Post subject: Reply with quote

Have you tried this:

Code:
%%BtnText = @dlgtext(button1)
if @equal(@dlgtext(%%BtnText),upgrade)



-Garrett
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Feb 02, 2003 8:24 am    Post subject: Reply with quote

Your idea does not work Garrett - i get an error at the first line of your suggestion...the error is to the effect that BUTTON1 is not a valid element!!?!!

I had already found a work around and i just wanted to know if others had come across the same problem - thanks for your suggestions as work arounds Smile Smile Smile

Silly me, i should have done a search of the archives first Embarassed

Serge

ps i was not notified by email that there had been a reply to my post...usually i get one...has something happened?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Feb 02, 2003 8:47 am    Post subject: Reply with quote

Yeah, my idea doesn't work because I wasn't paying attention and gave
you bad code to deal with there. Sad

It should've been this:

Code:
%%BtnText = @dlgtext(button1)
if @equal(%%BtnText,upgrade)


-Garrett
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Feb 02, 2003 8:56 am    Post subject: Reply with quote

i'll give it a try, Garrett!

i got email notification of your reply this time Confused

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


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

PostPosted: Sun Feb 02, 2003 8:57 am    Post subject: Reply with quote

Actually it just doesn't work Garrett (not in VDS3 anyway).

@dlgtext() won't read a button control... Wink

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


Last edited by Mac on Sun Feb 02, 2003 9:08 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Feb 02, 2003 9:05 am    Post subject: Reply with quote

Ok, I can understand Serge still being up, since he's in Australia, but
Mac, isn't it past your bed time? Twisted Evil Come to think of it, isn't it
past my bed time too? Rolling Eyes

You could be right Mac, I don't honestly know. I didn't try my code. I'll
be honest, I was watching a movie called "The Punisher" starring Dolph
Lungren.

If I run code while watching TV on my TV card, it screws things up. Sad

But I do know that sometimes, when you try to deal directly with an
element and it gives you a bad time, using a variable first to obtain the
information and then using that in a command sometimes works.

-Garrett
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: Sun Feb 02, 2003 9:11 am    Post subject: Reply with quote

I'm not sure it's a bug in @dlgtext() - more likely an error
in the help file. There seems to be plenty of those... Confused

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
Mac
Professional Member
Professional Member


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

PostPosted: Sun Feb 02, 2003 9:14 am    Post subject: Reply with quote

BTW Garrett, ya just need a good stable OS like Windows 95. Razz

I run my tv card a lot (especially news) when I'm programming. Wink

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
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Feb 02, 2003 12:23 pm    Post subject: Reply with quote

Mac wrote:
INFO @wintext(@winexists(~B1))


Mac, only @wintext(~B1) is also enough... Wink
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: Sun Feb 02, 2003 11:04 pm    Post subject: Reply with quote

Nice catch skit. Smile

I'll go ya one better - ya can also leave off the "~"... Wink

INFO @wintext(B1)

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
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Mon Feb 03, 2003 2:16 am    Post subject: Reply with quote

Off topic:
I seem to have a natural talent for people taking me in a bad way...its amazing actually...so in advance I don't mean anything bad by my post!

On topic:
Mine doesn't work w/o ~

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


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

PostPosted: Mon Feb 03, 2003 6:16 am    Post subject: Reply with quote

OOPS... Embarassed

My mistake - it doesn't work for me without the "~" either.

I often use "Test" with an INFO window to prevent an error
if there's no value. Apparently I had done this, and the text
of the button is "Test", sooooo... Confused

Thanks nodnarb - and don't hesitate to point out code errors
anytime. Wink

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 -> Bug Reports All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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