View previous topic :: View next topic |
Author |
Message |
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Sep 13, 2003 3:22 pm Post subject: |
|
|
mindpower wrote: | Below is code that does not work. At least not on Win9x boxes let me know if anyone gets different results. |
mindpower
I think the message number is conflicting. I just changed it. It works on both XP and win 98
Code: | LOADLIB USER32
OPTION MSGEVENT,$2FFFF,messages,HANDLED
DIALOG CREATE,Nieuw Dialoog,-1,0,240,160,class testmsg
DIALOG ADD,BUTTON,BUTTON1,29,69,104,40,&Send Message
DIALOG ADD,BUTTON,BUTTON2,76,70,105,41,Still &Alive ?
DIALOG SHOW
:Evloop
wait event
goto @event()
:BUTTON1BUTTON
%H = @STRDEL(@WINEXISTS(#testmsg),1,1)
%B = Eventname|par1|par2
%A = @LIB(USER32,PostMessageA,INT:,%H,$2FFFF,0,@Addr("%B"))
INFO %B!
goto Evloop
:BUTTON2BUTTON
info I am alive [Not hanged]
goto Evloop
:Eventname
info It worked?
goto Evloop
:Messages
%C = @msgparams(L)
Info %C
#parse "%%event;%1;%2;%3;%4;%5;%6;%7;%8;%9",%C
goto Evloop
:Close
FREELIB USER32
exit |
OK I think there are bugs in OPTION MSGEVENT ?
I tried some messages like:
WM_NCHITTEST
WM_NCACTIVATE
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_SETCURSOR
WM_NCHITTEST
WM_LBUTTONDOWN
WM_LBUTTONUP
and so on.
They are just ignored.
Doubleclick mouse messages are captured. WM_NCLBUTTONDOWN is captured.
I have not worked out the list of working non working messages though.
Is it intentional ?
? to prevent the slowing of the app by the volley of these common message processing. But then WM_MOUSEMOVE works!
?? To prevent the novice crahing his/her app by improper usage of these hooks.
??? certain types of hooks are not installed-- no that doen't explain either.
??? BUG ?
Lots of questions in my mind _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension
Last edited by CodeScript on Sat Sep 13, 2003 3:57 pm; edited 1 time in total |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Sat Sep 13, 2003 3:49 pm Post subject: |
|
|
I got WM_PAINT to work too, but alot of messages seem to be ignored |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sat Sep 13, 2003 4:15 pm Post subject: |
|
|
Hi All,
If it is a custom message then VDS should Register the Message Name with windows by calling RegisterWindowMessage and the return for RegisterWindowMessage is a message identifier in the range 0xC000 through 0xFFFF. If the function fails, the return value is zero. At least this is what the Win32 API help file says. Your Window cannot respond to just any Message ID you send it. For any message ID that is sent to the window depends on the Window's message loop as to which one it will respond to or process. So if you add a message event to VDS it should have added that ID to it's message loop while keeping it's other ID's in tack. If it is ignoring messages then I guess that part of VDS has a bug in it
Gadget on the other hand works a little different. It intercepts the message before it is posted to the window. Almost as if it has sub-classed the Window and actually the first part of sub-classing a window starts with intercepting the message's targeting the window you want to sub-class. _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Sep 13, 2003 4:41 pm Post subject: |
|
|
mindpower
Doesn't the above code work It worked here both on win 9x and XP pro.
mindpower wrote: | If it is a custom message then VDS should Register the Message Name with windows by calling RegisterWindowMessage |
I doubt that as:
msdn wrote: | The RegisterWindowMessage function is typically used to register messages for communicating between two cooperating applications.
Only use RegisterWindowMessage when more than one application must process the same message. For sending private messages within a window class, an application can use any integer in the range WM_USER through 0x7FFF. |
I think the only thing we have to take care is use a message spy and see that none of the dialog elements etc also have the message number as the custom message number we used.
I think it is bug that *lot* of messages are just ignored If it is so is there a hope for a fix in the update to be released _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Sep 14, 2003 9:09 am Post subject: |
|
|
I think to be sure of getting a message it has to be a WM_USER+X value. Most messages that are defined by Windows are acted upon by the runtime code itself, which is why you are not seeing them. The point of OPTION MSGEVENT is to allow a script to respond to custom messages sent by an extension DLL. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Sep 14, 2003 9:22 am Post subject: |
|
|
mindpower wrote: | Yes this would work but you only get 4 MESSAGES |
This is quite deliberate because the message processing loop is executed thousands of times a second and every extra bit of code added here affects the performance of every VDS program. This feature was added only as away for some DLLs to create events, or to implement features like asynchronous TCP/IP that send a message to an app's main window when an event happens.
VDS in general was never intended to be used for the kind of low-level stuff that involves dealing with Windows messages or using API calls. The recommended method of adding functionality to VDS is still to write a proper extension, the number of which you can have is now unlimited. These advanced features like option msgevent and @lib() were intended mainly to provide workarounds for use internally within Commercial Research or by advanced developers. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Sun Sep 14, 2003 2:48 pm Post subject: |
|
|
A little off-topic but I noticed you said using api for asynchronus tcp/ip. I'm assuming you are using this for the vds internet suite? Why not use a TThread to create a new thread? For instance when doing a http download you can separate it into another thread and create events while the rest of the vds script continues execution. |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Sep 14, 2003 5:54 pm Post subject: |
|
|
No, actually the Internet Suite DLL uses polling. I felt that asynchronous TCP/IP would be too difficult for most VDS users to deal with. The message event is only used when you listen on a port. A message is sent when someone attempts to connect to it. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sun Sep 14, 2003 7:13 pm Post subject: |
|
|
Quote: | These advanced features like option msgevent and @lib() were intended mainly to provide workarounds for use internally within Commercial Research .... |
That means it is just a bonus and not really intended for general use ? may be withdrawn too in future ???
N number of new me too easy .. kinda programming apps are appearing daily some are really too good and cost less too. Making me think I'm surely on a wrong place.. So people who want to use advanced features will leave. I am seeing many vds users moving towards such languages. I don't expect that everyhting on this earth in programming area be available in VDS but if advanced features are added just for internal use then ...
Extremely sad and dissapointed
OK I am not a software developer but for such people then VDS is a very costly option as for every small thing if the proper way is still an extension.
I am not trying to pickup a fight or anything here but I feel (and i think many others too) very dissapointed. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension
Last edited by CodeScript on Mon Sep 15, 2003 2:56 am; edited 1 time in total |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Sep 14, 2003 7:47 pm Post subject: |
|
|
I think indeed, if VDS won't fit for your application, you should use a different programming
language for that application. I think many people that move on to other programming languages
than VDS will still remain using VDS for the more simple applications, like myself (larger projects
get written in Delphi).
VDS isn't meant to be able to do everything, if it could do that, it would probably no longer
have the unique characteristics of VDS that make it very different from all other programming
languages.
To me it seems that VDS has been put over its limits pretty far already by
implementing the
custom DLL calling abilities. It must have taken quite an amount of work, even though it
won't be very useful to the typical VDS user. Most users that would know how to utilize
this ability effictively usually are already using another language than VDS and would
not be interested in learning VDS. |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Sep 14, 2003 8:50 pm Post subject: |
|
|
Frankly if I was a new user of VDS I would use the parts that I was able to
use. Just because a programming language isn't being used to its full
extent doesn't mean it is bad. And if a programming langauge includes
advanced features that one user doesn't use, doesn't mean you have to
remove it for all users.
I was originally happy to see VDS get a more mature set of features but
now I'm just discouraged and if the features that will be added/upgraded
in future VDS versions are things such as sending keystrokes I think I
won't be using VDS anymore. It's sad because you can attract a lot
of people by having good features, and no other language I've used has
been so simple to learn and use, even with the advanced functions. And
as for the "advanced users", I'm sure that there and a lot more than just
Mindpower and CodeScript and all the others who regulary do "advanced"
coding.
Excuse me if I offend anyone, but I wouldn't want VDS to turn out like some
bad piece of software like O'Basic. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Sep 15, 2003 5:25 am Post subject: |
|
|
I understand that ease of use(at best in VDS) and complexity of functions are diagonally opposite things. I am not expecting everything on the earth in the programmming langauge be available in VDS. Also I am not comparing the features available in Delphi/C/Basic here but with very similar languages as VDS written in delphi.
What a user hates is being told that : "Look, this langauge development has almost come to an end as for as you are concerned. If we add any advanced features it is for our own internal use. They are not primarily intended for you. If you get it to work OK else you just go for a extension/different language or bang your head against the wall or whatever we are bothered the least BUT don't come here and start complaining that a certain feature is not available or there are bugs etc like a silly child as we never intended that you use these internal features in the first place. So you better understand not to do such a silly thing as feature request or bug report in future as they will be simply SHOT DOWN OUTRIGHT".
Also everytime I encounter this problem it appears as if VDS is a language built and developed primarily for private use by it's developers. It is being released to general public for a *small* fee purely as a favor done to the public. If that is the case then it is very obvious that asking for anything is expecting a really undue favor ("already the biggest favor of giving you[user] the langugae to use is done").
What adds more to my above thinking is the fact that I haven't seen (I may be wrong/blind ?) any member/represenatative/developer other than Jules from Commercial Research comming here and making a announcement/relpy/explanation or whatever.
Any way I am very angry now and I think I should cool down. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Sep 15, 2003 8:28 am Post subject: |
|
|
CodeScript wrote: | That means it is just a bonus and not really intended for general use ? may be withdrawn too in future ??? |
You're right that it is not intended for general use, only for advanced users, people like you in fact, who might use it to package some functionality into a DSU that can easily be used by everyone else. There is no intention to withdraw features that are now present, though.
VDS has always been intended to be an easy to use programming language for people who don't know much about programming, and API programming is, by definition, not that. The concern is that some potential users might come to this site, read about all this API stuff, and go away thinking "VDS is much too hard", not realising that they never need to use it. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Sep 15, 2003 9:29 am Post subject: |
|
|
CodeScript wrote: | snip...
Any way I am very angry now and I think I should cool down. |
Codescript, I am taking some time to reply to your tirade because it wasn't my intention to upset you, and I have great respect for your abilities as demonstrated here by all the examples you have uploaded. I think you have really taken what I said the wrong way. But having said that, I don't think that the majority of users of VDS are very interested in the complicated features that we are discussing here. I don't think that is what most people buy VDS for.
I think Tommy's reply is just about spot-on, quite frankly. There are things that VDS is good at, and there are things for which Delphi/C++/VB etc. might be a better choice. There are sound reasons for choosing a mainstream programming language for development of large projects. Things like the existence of block structure, function prototypes, typed variables, variables having to be declared. Things that make it possible for the compiler to spot errors which VDS, being an interpreter, will only find when a duff line of code is executed. Things that make it much easier to manage large projects. If you have ever studied computer languages at degree level you will know that many of the features of the Dialogscript language (e.g. the goto statement, lack of block structure) are deprecated by computer scientists.
That doesn't take away from the fact that VDS is still the fastest, easiest way to create smaller programs, or develop prototypes of applications. That, presumably, is why we all use and love it. It's because VDS doesn't have block structure, function prototypes, typed variables, variables having to be declared, etc. that it is quick for the experts to quickly knock up a simple program, and easy for complete beginners to use. Every line of code that you type does something, and you can see the flow of program execution instead of having a bunch of discrete procedures with no obvious connection between them. That's why I continue to use VDS for many of my own projects even though I could use Delphi instead.
But I personally don't want to see VDS try to do all the more complex things that can be done in Delphi, C++ etc. because I think you'd have to radically change the Dialogscript language to make it possible. In the process you'd lose many of the benefits I just mentioned that make Dialogscript simple to learn and easy to use.
I personally think that any feature should only be implemented in VDS if it can be done in a very easy to use way, because the whole philosophy of VDS is to be a programming language that is easy to use. API calling is plainly not that. There are benefits in being able to make API calls direct from VDS without requiring an external DLL like Gadget to do so, if you know how to do it. That is why the feature is now there in VDS 5. But the fact that the help file says, in effect, "if you use this and have problems, you're on your own, chum" should show quite clearly that this isn't something that was intended for use by your typical VDS user. VDS was never intended to be something where programmers are expected to make API calls. I really feel that you should consider it a benefit that it is now possible at all, rather than complaining about the limitations.
Finally, I have to make clear once again that I am not "from Commercial Research." I was the original developer of VDS but I sold all the rights to SADE sarl several years ago prior to the release of VDS 3. I have my own company, Tech-Pro Limited, and my own site at http://www.tech-pro.co.uk/ which are nothing to do with VDS. I was contracted by SADE to develop the VDS 5 run-time and IDE, but nothing more. My opinions here are made as a VDS user and with the knowledge of what I had in mind when I first invented VDS. I have no knowledge of what Commercial Research has in mind for the future of VDS, and Commercial Research has its own reasons for not choosing to participate in the discussions on this forum. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Sep 15, 2003 1:03 pm Post subject: |
|
|
jules wrote: | I personally think that any feature should only be implemented in VDS if it can be done in a very easy to use way, because the whole philosophy of VDS is to be a programming language that is easy to use. |
I agree and thank you for inventing such a langauge which is extremely easy to use. The only thing that had upset me was me thinking advanced features added only for private use by CR and also the fact that no other developer or CR person is invloved in hearing to any users grievances or anything (I know you are not "from Commercial Research.").
I don't think that there is any other forum either where they do so. So I have serious doubts as to whether reporting bugs etc here is just for crisis relief kinda thing than anything else. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
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
|
|