Ok, Im trying to get my bot to connect as soon as the bot is opened, and I also want to be able to check a checkbox to determine if this will happen or not. Can anyone help me with the code I need to enter to make this happen?
Yes. Create a button; on exit from the program, save whether the button was checked. On startup, load that setting from registry/disk/wherever, and if it says the button was checked, call your connect method immediately.
Im not sure i really understand that, but is there a way I can make something automatically "run" when I open the bot. I cna figure out the rest on my own.
Quote from: Yegg on August 21, 2004, 06:12 PMIm not sure i really understand that, but is there a way I can make something automatically "run" when I open the bot. I cna figure out the rest on my own.
Yes. Put it in the entry point function, which is typically main (Win32 console / Unix), or WinMain (Win32 GUI). Alternate names are needed if you want to get Unicode native parameters.
Or on Form_Load, just call your connect call and it should start the logon sequence. Or you can do what was previoulsy posted and make a button to call on when you load your bot.
Supposing that you have Getstuff and WriteStuff functions:
In config form:
Private Sub SaveButton_Click()
Writestuff "Misc","ConnectOnStartup", YourCheckBoxName
End Sub
Private Sub Form_Load()
YourCheckBoxName = Getstuff("Misc","ConnectOnStartup")
End Sub
'Main Form
Private Sub Form_Load()
If Getstuff("Misc","ConnectOnStartup") = "1" Then
'Connect Coding Goes Here
End if
End Sub
:)