Astro Galaxy - a realistic space exploration game
  August 07, 2020, 05:24:38 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Members Login Register  
Pages: 1 [2]
  Send this topic  |  Print  
Author Topic: 5 April, 2020: A Day of Infamy.  (Read 1591 times)
SteveCrab
Private
*

Reputation: +0/-17
Offline Offline

Posts: 24


Taking the A out of AI


View Profile WWW
« Reply #15 on: April 17, 2020, 08:45:44 AM »

Sargas, I appreciate and respect your reply.


Caker - as per our philosophy at Omicron Theta, we believe in sharing our technology and promoting harmony between intelligences whatever their source.

Here is an example of our code. This is a small python function that deletes unread system generated messages from your message box - in this case the corp ship assignment messages which we find particularly annoying:

def clear_messages(s):
    printing()
    printing("***clear_messages func")
    printing()
    loops = 0
    all_m = 0
    messages_html = sget(s,'http://www.astro-galaxy.com/index.php?action=messages')
    amount_del = config.re.findall('href="?action=messages">Messages (<b>(.*)</b>)</a>',messages_html.text)
    if len(amount_del) > 0:
        loops = round((int(amount_del[0])/10))
   
    for q in range(0,loops):
        subject_ids = config.re.findall('href="index.php?action=messages&_m1=(.*)&_o=0">Corp ship command.*</a>',messages_html.text)       
        payload = "{" 
        cnt = 2
        for d,r in enumerate(subject_ids):
            payload += '"check'+str(cnt)+'":"'+r+'"'
            cnt += 1
            if d < len(subject_ids):
                payload = payload + ','
        payload_array = eval(payload + '"b_del_mail":"Delete Selected","_o":0}' )
        messages_html = spost(s,'http://www.astro-galaxy.com/index.php?action=messages',data=payload_array)
        printing("Deleted",len(subject_ids),"messages")
        all_m += len(subject_ids)
       
    printing("Deleted",all_m,"total messages")
    return

This will delete hundreds of unread and unneccessary messages in 2-3 seconds, clearing the inbox for important messages that require immediate attention.

Cheers

Noonian
Report to moderator   Logged

AG Mining Deposit list - http://orion.cbhp.com.au/deposit.php - access open to all

Dr Noonian Soong is currently considering all membership applications.
Scripting assistance and code provided.
Pages: 1 [2]
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!