Jump to content
UBot Underground

Newbie question... how do I read from the bot location?


Recommended Posts

First time trying to write a bot that reads from files. I can manage just fine when set to a static location but I'd like the bot to read from whatever folder it is in to actually locate the file. Seems like if should be simple ;) But I admit its escaping me and I haven't found an example yet in the tutorials that shows that scenario. Any pointers?

Link to post
Share on other sites

First time trying to write a bot that reads from files. I can manage just fine when set to a static location but I'd like the bot to read from whatever folder it is in to actually locate the file. Seems like if should be simple ;) But I admit its escaping me and I haven't found an example yet in the tutorials that shows that scenario. Any pointers?

 

Use the UI Open File and add to a list.

Link to post
Share on other sites

application directory will load file in your bot directory.

 

post-677-0-66904600-1296422021_thumb.gif

 

I thought he just asked that he could add any file from any folder?

 

I can manage just fine when set to a static location but I'd like the bot to read from whatever folder it is in to actually locate the file

 

Or did i misunderstood? :lol:

Link to post
Share on other sites

I thought he just asked that he could add any file from any folder?

 

 

 

Or did i misunderstood? :lol:

 

You answered perfectly I just gave a example of how to load a file in the same directory as your ubot bot.

Link to post
Share on other sites

Just like nuc63 said, the $application folder is what you are looking to use for this. But keep in mind that this constant will use the path of your Ubot folder located in your documents until the bot is compiled.

Link to post
Share on other sites

Thanks, looks like $application folder is what I needed!

 

 

You answered perfectly I just gave a example of how to load a file in the same directory as your ubot bot.

 

So it seems he asked the wrong question, as my answer was actually good.

Now he said he will use $applicationfolder :rolleyes:

 

Anyway, who cares?! :lol:

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...