[RESOLVED] 3 Very Simple Questions
Hi :wave:
Is it posible to have vairibles like so:
VB Code:
Dim Var1 as Short
Dim Var2 as Short
Text"Var1"Part"Var2" = Green
And if so what is the syntax?
Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
Lastly:
Shortcuts to exe's have the .exe location, and also the location to start the program in.
How do I do this in VB?
Many thanks,
Yacoby
Re: 3 Very Simple Questions
welcome to vbforums
What does this mean? I'm not familar with it:
Quote:
Text"Var1"Part"Var2" = Green
Quote:
Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
Yes, you can do this. It is possible to compile VB code as apps (exe's) that run all the time. It is also possible to remove the tile on the task bar and just have an icon in the system tray. It is also possible to run VB apps as a service, although I have no experience with this, it is quite advanced.
Quote:
Shortcuts to exe's have the .exe location, and also the location to start the program in.
How do I do this in VB?
Check to see if your version of VB has deployment application built in. I downloaded the Beta version at home and it did not have the ability to build a "setup" application to install your app on the users machine. You may have to spring for a higher version if this is not a part of your version.
Lastly. This is a great forum with lots and lots of good advice. It has a lot of posts. Learn to search first, you will see some names over and over again with posts in the neighborhood or 2,000 - 12,000? These people probally are not naturally brilliant (sorry guys) they are really, really persistent at researching their questions and finding out their answers by searching this forum and the help files (both local and online). I appreciate these people deeply, you will learn a lot by reading what has already been posted first.
Good luck.
Re: 3 Very Simple Questions
Quote:
Originally Posted by Yacoby
Hi :wave:
Is it posible to have vairibles like so:
VB Code:
Dim Var1 as Short
Dim Var2 as Short
Text"Var1"Part"Var2" = Green
And if so what is the syntax?
Unless you implement some heavy reflection, You can't do this. Are you coming from a PHP background?
Quote:
Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
Windows Services.
Quote:
Lastly:
Shortcuts to exe's have the .exe location, and also the location to start the program in.
How do I do this in VB?
Do what? Make a shortcut or launch an EXE?
Re: 3 Very Simple Questions
Quote:
Do what? Make a shortcut or launch an EXE?
Launch a program via VB
'------------------------
Quote:
Unless you implement some heavy reflection, You can't do this.
Ah, OK
Quote:
Are you coming from a PHP background?
No, it is just someting in my mind that you should be able to do
I don't have any real scripting ecperiance at all (I did some for a PC game mod but that doesn't count as it was very simple language) , and I am doing VB for A level, but I have got annoyed obout how everything they gave me to do is so simple, so I am doing stuff on my own.
'------------------------
Quote:
Is it possible to have a script that is constantly running, as I have only managed to make scripts run on events
Ok. I um.. Wrote something/tried to explain something wrong
You can run parts of scripts, when you click a button, when you dobule click, when a dropdown is opened etc (See below for an example)
VB Code:
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Close()
End Sub
But is there any way so that part of the script is running all the time the app (.exe) is open, and you don't have to do any action
I just haven't found a way to do this yet.
I hope you understand this better now
'------------------------
Quote:
What does this mean? I'm not familar with it:
VB Code:
Text"Var1"Part"Var2" = Green
I should have put:
VB Code:
Text"Var1"Part"Var2".text = Green
I wasn't sure of the syntax so I made it up
What I wanted to do was:
VB Code:
Dim Var1 as short
Dim Var2 as short
'If the code was like this
Text"Var1"Part"Var2".text = Green
'And the vars were set like this
Var1 = 2
Var2 = 5
'then in effect, it would look like this:
Text2Part5.text = Green
I hope I made myself clearer this time
Thank you both for your help :)
Yacoby
Re: 3 Very Simple Questions
System.Diagnostics.Process.Start("C:\Path\To.Exe")
Re: 3 Very Simple Questions
Quote:
Originally Posted by mendhak
System.Diagnostics.Process.Start("C:\Path\To.Exe")
That only works if the aplication is in the directory where the .exe is, I was looking for a command that would run it from an aplication placed anywhere