• Log in or sign up for an account here: https://www.sythe.org/login

[TUT] Super Easy Way to Make Your Own Scripter

Blupig

BEEF TOILET

$5 USD Donor
Joined
Nov 23, 2006
Sythe Gold
1,609
Messages
7,145
Location
Canada
Discord Unique ID
178533992981594112
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
[TUT] Super Easy Way to Make Your Own Scripter

WHAT YOU NEED:
-Script Control (select by pressing ctrl+t)
-Textbox
-Command Button
-Standard EXE

Lol this is so easy - Place your command button, your text box and your script control anywhere on the form.

1. Add this code into your command button:
Code:
On Error GoTo Err
	ScriptControl1.AddCode Text1.Text

Err:
	If Err.Number = 0 Then
	Exit Sub
	End If
	MsgBox "ERROR " & Err.Number & ": " & Err.Description, vbCritical, "Script Error"

Alright, so that first line tells the application that if something goes wrong to execute th instructions in the "Err" section, define 1 line later. That second line tells the script control to execute the code in the Text1 textbox. The "Err" part is really only 1 message box that tells the user what error happened. Error 0 happens everytime an instruction is sent to the application, so we tell the application that if the error's ID is 0 to not do anything about it. But, if the error is something else, to shout out the error number number and the error description in a message box.

2. That's actually...It.

---------------------------
Tutorial brought to you by Blupig
Please thank/rep if available.
 
How does it not compile? I can help out, I'm sure.

compile means to make, i had no trouble with the code. when i say compile i was referring to building an .exe file. i don't think help will be necessary but thank you for the offer.
sorry, i realize i wasn't clear. when i said 'it' doesn't compile i should have said that to bad the scripter doesn't allow you to save programs that you have made.
 
Also if you want a calculator you can do
[code
ScriptControl1.Eval(text1.text)
[/code]
 
duelarena.gg
Back
Top