| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jun 28, 2002 2:25 pm Post subject: Enabling a control on another window, help! |
|
|
Is there a way to enable a control on a program written in VDS, but even if the window is not in the same script? For example, say there is a COMBO element on another compiled VDS EXE that you have and you want your program to be able to enable the COMBO element. I don't know if this is possible, but I know you can hide/show a compiled VDS Window by using WINDOW NORMAL or WINDOW HIDE. Any thoughts? Thanks.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sat Jul 20, 2002 1:55 pm Post subject: |
|
|
Maybe you can use the register...
Client (External window)
| Code: |
:evloop
%%event = @event()
if @not(@null(%%event))
goto %%event
end
%%regread = @regread(CURUSER,Programname,Combo)
if @equal(%%regread,1)
dialog enable,combo
registry delete,CURUSER,Programname
end
if @equal(%%regread,0)
dialog disable,combo
registry delete,CURUSER,Programname
end
goto evloop
|
Server (Your program)
| Code: |
:EnablecomboBUTTON
registry write,CURUSER,Programname,Combo,1
goto evloop
:DisablecomboBUTTON
registry write,CURUSER,Programname,Combo,0
goto evloop
|
Ps. Sorry if I'm a little late, but sometimes I like it to post reply's on old stuff... :-) |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Jul 20, 2002 2:59 pm Post subject: |
|
|
This should be possible using the @SENDMSG() function and Windows API messages.
You can download the VDS API Reference with very detailed information exactly
about this topic in the registered user section at dialogscript.com.
Tommy |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jul 20, 2002 3:37 pm Post subject: |
|
|
Hi Tommy,
Thanks for the tip , I already looked at it though.
I read about the topic, but it seems that you can only use the @sendmsg() in your script. This is a compiled .exe that I am using for a script I was writing...I wanted to be able to disable/enable controls for security purposes, but I lost the source to the program, so I just wanted to control it from another script. For example, if I wanted to disable BUTTON1 from another script, I don't know if it is possible...any hints would be great.
| Code: | title TEST
DIALOG CREATE,TEST,-1,0,213,215
DIALOG ADD,BUTTON,BUTTON1,170,70,,,,DEFAULT
DIALOG ADD,LIST,LIST1,10,12
DIALOG SHOW |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Jul 20, 2002 3:46 pm Post subject: |
|
|
Look under WM Messages and then "WM_ENABLE". Please note that of course
a third party application of course could send a similar message, so that it may not
be entirely safe for security purposes.
Tommy |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jul 20, 2002 3:55 pm Post subject: |
|
|
Thank you for your help...
This is just to enable/disable a control so that people cannot click on it, but it will not require high security, in other words, there is a limit to what program will be running on the computers. Other applications can/will be blocked.
I still do not understand, though, how to enable it on another window. My guess is that you have to add something else, or change it, because there is no place to specify what window to send the message to if you are using like ~BUTTON1 or something...
Thanks for your help so far though.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Jul 20, 2002 4:05 pm Post subject: |
|
|
This will not be easy. You can use @WINEXISTS() to determine the window handle of the other dialog (by specifying the dialog title or class name). Then I guess you'll have to use @WINDOW(<window>,FIRST) and @WINDOW(<window>,NEXT) maybe in combination with @WINTEXT() on the results to figure what is the window handle of the control you want to disable...
Tommy |
|
| Back to top |
|
 |
|
|
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
|
|