TheTechGuide Forum

General Category => Tech Clinic => Topic started by: iNfaReD on December 30, 2006, 05:17:48 AM

Title: Visual Basic :) - i need help
Post by: iNfaReD on December 30, 2006, 05:17:48 AM
Well basically i wanted to make a Visual basic Script for a 'World Switcher' for something.

Well here is my script so far:
Code: [Select]
Private Sub Form_Activate()
Dim directory As String 'location of .bat file
Dim fileno As Integer
   
directory = App.Path & "\RunBot.bat"
On Error Resume Next
   
fileno = FreeFile
   
Open compile For Append As fileno
Print #fileno, "@ECHO OFF" 'Dos command to hide command prompt
Print #fileno, "java -cp build;bcel.jar;Scripts;Randoms com.ms.arga.bot.BotLauncher" & Text1.Text
Print #fileno, "pause"
Close fileno
   
Shell compile, vbNormalFocus
End Sub

im trying to make the Dos commands
@echo off
java -cp build;bcel.jar;Scripts;Randoms com.ms.arga.bot.BotLauncher
pause

Edit a bat and save it, but to save it you need to type in a world like 107 for instance
and click 'Save' on the button and it would edit the bat adding the '107' onto the botlauncher command as seen above making it look like this:

@echo off
java -cp build;bcel.jar;Scripts;Randoms com.ms.arga.bot.BotLauncher 107
pause

so when i would run it, it would open up on world 107.

i need help making it /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />

My Text name is "Text1"
my Buttons name is "Command1"

so i basically want it to open up the bat, wait for the user to enter the world number and wait for them to press save
then it edits the bat with this:
@echo off
java -cp build;bcel.jar;Scripts;Randoms com.ms.arga.bot.BotLauncher
pause

But on the java -cp String i want the TEXT To add on to the end of it making it like i said before edit the string to what the user typed in (eg.
@echo off
java -cp build;bcel.jar;Scripts;Randoms com.ms.arga.bot.BotLauncher 107
pause
 making it go to world 107.)
then when its finished it would save it.

I hope someone can help me,

Thanks
iNfaReD
Title: Visual Basic :) - i need help
Post by: ?Calvin? on December 30, 2006, 06:15:03 AM
Thats gt me confuzzled /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
Title: Visual Basic :) - i need help
Post by: iNfaReD on December 30, 2006, 08:32:21 AM
But it will be awesome if i find a fix for it /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />,

Because its for a runescape autoer thats pro and undectable
Title: Visual Basic :) - i need help
Post by: guestolo on December 30, 2006, 12:50:49 PM
This question would seem more appropriate at a VB forum
http://www.vbforums.com/ (http://\"http://www.vbforums.com/\")