Difference between revisions of "BotPath function"

From StealthBot Wiki Backup
Jump to: navigation, search
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:20, 1 December 2017

The BotPath() Script Support Class function returns the path to the bot's folder.

Development

The BotPath function was added to StealthBot in version 2.6, as suggested by werehamster.

Documentation

'// BOTPATH
'// Returns the bot's current path. Future compatibility with multiple user profiles is already in place.
'//     Return value includes the trailing "\".
Public Function BotPath() As String
    
    BotPath = GetProfilePath()
    
End Function

Summary

This function returns the current bot's location in your windows directory.

Syntax

CurrentDir = BotPath()

Returns

Returns the folder path ending with a \.

Examples

  • Create a new text file in your bot's folder.
  • Dim FSO, File
    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set File = FSO.CreateTextFile(BotPath & "newtextfile.txt")
    File.WriteLine("This file is in the bot's folder!")
    File.Close
    

See also