Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / DBPro scripting

Author
Message
kulet
13
Years of Service
User Offline
Joined: 18th Aug 2011
Location: At your back!!!
Posted: 15th Sep 2011 08:58
Hi there, I wonder if there is such things as a menu for all the .exe that I have?

For example:

button 1 is for .exe 1
button 2 is for .exe 2
button 3 is for .exe 3
and so on...

so basically when I press button 1, .exe 1 will run automatically and so on...

O by the way, can I also make it animated?

Thanks if there is someone who can teach me.

better than ever
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Sep 2011 12:39
If you want a menu, you have to code it yourself. There is no "MAKE MENU" type commands.

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 15th Sep 2011 15:31
Quote: "O by the way, can I also make it animated?"

Sure can. The way I would tackle this is to use sprites (which can be animated). So basically place a few sprites around the screen. Then to add the clicking effect you'll need to check the mouse's x values and y values against the sprites' values to see if the sprite has been clicked on. If true then use the command "Execute Executable" to launch the applications. Hope that gets you on track

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 16th Sep 2011 18:38 Edited at: 16th Sep 2011 18:42
Hi kulet; assuming the menu you require is in your own program and not the IDE; if you want to create the code for the menu to load specific files; one way it could be done is to create an array

and iterate through the array in a loop

and draw the menu.

If the mouse clicks
in the menu item, perform your execute file command
on the array index.

You can also use [Find First] and [Find Next] in conjunction with other file commands, described in the help documentation, to search for exe's in a folder; but this may not be a secure feature in this scenario.

Login to post a reply

Server time is: 2024-11-24 01:35:29
Your offset time is: 2024-11-24 01:35:29