Author Topic: BOTify your code  (Read 5994 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
BOTify your code
« on: February 16, 2018, 11:29:32 am »
So who knows what about code connecting to Internet and interacting with stuff on it?

Fellipe showed me this project which looks very interesting:
https://github.com/wfbarnes/sprezzo/blob/master/HELP.txt

I'd like to be ready for the Singularity or at least The Terminator.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: BOTify your code
« Reply #1 on: February 16, 2018, 03:18:46 pm »
Here is a for instance starter, that impresses the heck out of me.

vince, tempodiBasic, Adrian and other chess lovers might like it too.

SmallBASIC code that visits a site and copies 20 end game programs.

I wonder can be translated to QB64 and generalized to be done with simple commands to a bot.
Code: QB64: [Select]
  1. 'internet grabber jasali  SmallBASIC 0.12.11 2018-02-13
  2.  
  3. open "chess-pgnfile.pgn" for output as #2
  4. for i=1 to 20
  5.   open "http://moodle.usm.md/endgame/getpgn.php?pid="+i as #1
  6.   tload #1,p
  7.   ?p:?#2,p
  8.   close #1
  9. pause 'for screen shot and scroll through screen
  10.  
  11.  

file extension name changed from pgn to txt because that is all the file is, a text file.


TLOAD loads a file in a single pop to an array or a long string. Here it looks to be single line arrays??? either that or ? (PRINT) can print an array in a pop too?? with variable typing p could be a string or an array??

I have not seen TLOAD used with Open and file handle before, I guess it is to create file names on the fly.
usually it is used as
TLOAD "thePath\theFile.theExt", myArray
without an OPEN statement.

I am not sure QB64 can do that specially off Internet???
« Last Edit: February 16, 2018, 03:38:16 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: BOTify your code
« Reply #2 on: February 20, 2018, 07:39:43 pm »
Taking discussion of Bots in Chat rooms here:

I have to say, at IRC, all the bots are addressed or commanded before they do they their thing.

I don't think they go off on their own unbidden. I have not seen that.

Plus there is appreciation of bots with cool tricks or provide handy services.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: BOTify your code
« Reply #3 on: February 20, 2018, 07:43:38 pm »
Well, if you can put together a bot-let, to bring me coffee, by all means.

There is an annoying one that is part of IRC chat that demands I sign in or I don't get the name "Pete" to use in chat. It assigns some lame Guest35346356363343636366363636365347457474747474747568568585858568585 alias. I left, because with that many guest, who would have a chance of getting a post in edgewise?

Pete [Wait for it...]


Boom!
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: BOTify your code
« Reply #4 on: February 20, 2018, 07:54:16 pm »
Well maybe a bot can be made to sign in for you.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: BOTify your code
« Reply #5 on: February 20, 2018, 08:49:00 pm »
No thanks. It would have to have my password. That's worse than my wife having my credit card [Insert horrified smiley here.]

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: BOTify your code
« Reply #6 on: February 20, 2018, 09:26:01 pm »
Quote
Well, if you can put together a bot-let, to bring me coffee, by all means.

Someone already had that idea

https://www.google.com/search?q=amazon+coffee&client=opera&hs=GqM&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjd0u79-bXZAhUFy1kKHUp-CPIQ_AUIDSgE&biw=1291&bih=671

Maybe a drone will fly it in for you too.
« Last Edit: February 20, 2018, 09:29:30 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: BOTify your code
« Reply #7 on: February 20, 2018, 09:31:29 pm »
Ahhhhh. Thanks dude!

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/