Jump to content
EN
Play

Forum

Quick ‘n Easy Server Loader (made by werty8763)


 Share

Recommended Posts

nice.

 

you should probably start adding comments to help us know what each line does

 

eg, 

Click, 640, 395   ; Clicks on the convert button for my screen

 

or

 

; Pressing Ctrl+D will do...

 

Anything after a semi-colon gets ignored and won't result in an error.

 

az

Share this post


Link to post
Share on other sites

nice.

 

you should probably start adding comments to help us know what each line does

 

eg, 

Click, 640, 395   ; Clicks on the convert button for my screen

 

or

 

; Pressing Ctrl+D will do...

 

Anything after a semi-colon gets ignored and won't result in an error.

 

az

Maybe I should do that..... :lol:

And yes, I knew that..... -_- :D

Share this post


Link to post
Share on other sites

The idea of the script it very cool, I must say.

But it doesn't seem to work for me... :(

 

I think I'll need to edit the coordinates of some of the points.

Also, do you think it's possible to make one that doesn't open a browser? That would be awesome!

Share this post


Link to post
Share on other sites

Oh, and BTW, AZ, did it work for you? :huh:

Or did you edit the (x,y) coordinates for your pc via Window Spy?

I didn't run them but I did view the scripts so I see what they achieve. I did not edit them xy's either because there were no comments to tell me what you were wanting them to click !!!

 

You know you could do away with some x,y clicking by making use of  tab or shift+tab

eg,

send, {tab 5} ; this presses the tab button five times across or down

 

so if you're in an edit field on a webpage and then you send a tab event, the focus would jump out of the box you're in and onto the next object on the page, a convert button for example.

 

They're basic scripts and you'll only keep on learning and improving so stick with it.

 

 

Also, do you think it's possible to make one that doesn't open a browser? That would be awesome!

I wouldn't have the first clue!

 

 

 

This is my latest addition to my ahk script. Not that i'm obsessed or anything. B)

I might be using it future to assess the battles before I enter them so if there is a known lagger or someone who I suspect uses cheats all the time, then I know which side I should or shouldn't join. But even if I don't get around to doing that, it's handy to start recording information, screenshot urls etc to file, all kept in a tidy and orderly way.  :lol: 

 

lAiWu3V.jpg

 

Edited by AbsoluteZero

Share this post


Link to post
Share on other sites

Here is a handy script that will help you get screenshots as you play in tanki and save them to a folder on your desktop. When you press PrintScreen, it will open up MSPaint.exe and save your screenshot with a timestamp for its name. It will then close MsPaint and then unpause your play by clicking the centre of your screen before returning your mouse to its original position before you clicked on Printscreen. The whole process takes about a second.
 
See if it works for you. (windows only)
Requires AutoHotKey
Not sure if it works for standalone flash player
 


~Printscreen::
; create a directory on desktop
IfNotExist, %A_Desktop%\ScreensByAZ       
    FileCreateDir, %A_Desktop%\ScreensByAZ
 
; get your existing mouse coords
MouseGetPos, xpos, ypos           
 
; These coords are middle of screen
Screen_X := A_screenwidth / 2           
Screen_Y := A_screenheight / 2
 
; Timestamp info for filename
FormatTime, TimeString, , yyMMdd_HHmmss   

; Block inputs  to stop interfering
blockinput, on                              
blockinput, sendandmouse
 
; open the paint program
run, mspaint.exe

WinWait, Untitled - Paint, , 5
If ErrorLevel
{
ToolTip, Time Out Error
SetTimer, RemoveToolTip, 2000
}
Else
{
SendInput, {ctrl down}v{ctrl up}
Send,!fa
WinWait, Save As
scrn = %A_Desktop%\ScreensByAZ\%TimeString%
SendInput, %scrn%
Sleep, 800
sendInput, {enter}
settitlematchmode, 1
winactivate, %scrn%
Sleep, 800
winclose, A
}

sendevent, {click %screen_x%, %screen_y%}   ; move to middle of screen and click
mousemove, %xpos%,%ypos%,0                      ; move back to original mouse position
blockinput, default                                               ; Unblock inputs
blockinput, off
return

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
Return

 

Edited by AbsoluteZero

Share this post


Link to post
Share on other sites

The idea of the script it very cool, I must say.

But it doesn't seem to work for me... :(

 

I think I'll need to edit the coordinates of some of the points.

Also, do you think it's possible to make one that doesn't open a browser? That would be awesome!

I'll think about making one..... ;)

Share this post


Link to post
Share on other sites

Here is a handy script that will help you get screenshots as you play in tanki and save them to a folder on your desktop. When you press PrintScreen, it will open up MSPaint.exe and save your screenshot with a timestamp for its name. It will then close MsPaint and then unpause your play by clicking the centre of your screen before returning your mouse to its original position before you clicked on Printscreen. The whole process takes about a second.

 

See if it works for you. (windows only)

Requires AutoHotKey

 

 

 

 

~Printscreen::

; create a directory on desktop

IfNotExist, %A_Desktop%\ScreensByAZ

FileCreateDir, %A_Desktop%\ScreensByAZ

 

; get your existing mouse coords

MouseGetPos, xpos, ypos

 

; These coords are middle of screen

Screen_X := A_screenwidth / 2

Screen_Y := A_screenheight / 2

 

; Timestamp info for filename

FormatTime, TimeString, , yyMMdd_HHmmss

 

; Block inputs to stop interfering

blockinput, on

blockinput, sendandmouse

 

; open the paint program

run, mspaint

 

; Wait for it to load (3 seconds) and if not display an error

WinWait, Untitled - Paint, , 3

if ErrorLevel

{

ToolTip, Time Out Error

SetTimer, RemoveToolTip, 2000

}

 

Else

{

SendInput, {ctrl down}v{ctrl up} ; Paste

send, !fa ; Save as

WinWait, Save As ; wait for save as window

scrn = %A_Desktop%\ScreensByAZ\%TimeString% ; file url

SendInput, %scrn%

sleep, 500

sendInput, {enter} ; Save as timestamp

send, !{f4} ; close window

sleep, 250 ; wait for tanki to resume

}

 

sendevent, {click %screen_x%, %screen_y%} ; move to middle of screen and click

mousemove, %xpos%,%ypos%,0 ; move back to original mouse position

blockinput, default ; Unblock inputs

blockinput, off

return

 

RemoveToolTip:

SetTimer, RemoveToolTip, Off

ToolTip

Return

 

 

Wow..... :o

You are a genius....... :D

Share this post


Link to post
Share on other sites

Nope, I'm on my phone..... :D

Same, like always! And what is Mult? Their was this sabotaged rank Captian, (after 1st leuitenite)

He had twins and kept pushing me off! I have had 6 sabotages with Vulcan m2!!! I don't know why I'm so attractive B) oh ya

Share this post


Link to post
Share on other sites

Same, like always! And what is Mult? Their was this sabotaged rank Captian, (after 1st leuitenite)

He had twins and kept pushing me off! I have had 6 sabotages with Vulcan m2!!! I don't know why I'm so attractive B) oh ya

I never knew there was such a rank as 1st leuitenite..... :P

And you don't make any sense...... <_<

Edited by werty8763

Share this post


Link to post
Share on other sites

Same, like always! And what is Mult? Their was this sabotaged rank Captian, (after 1st leuitenite)

He had twins and kept pushing me off! I have had 6 sabotages with Vulcan m2!!! I don't know why I'm so attractive B) oh ya

This is an ahk topic. Please refrain from posting anything non-related. You're spamming and it's annoying. Just don't.

  • Like 1

Share this post


Link to post
Share on other sites

This is an ahk topic. Please refrain from posting anything non-related. You're spamming and it's annoying. Just don't.

Thank you for speaking my mind..... :)

Share this post


Link to post
Share on other sites

Here is a handy script that will help you get screenshots

Nice. It worked well. Only towards the end, it closed my TO player... :O

Also, I was wondering if you could make that happen silently... I mean... without opening paint or interrupting your game.

 

Btw, I finalized my Garage Opener. Its and AHK and an EXE. The ahk file waits for the hotkey... Ctrl + G and when those keys are pressed, it runs the exe. The exe scans the screen for the inactivated garage button. And if found, it clicks on it and then clicks "Yes" in the "Stay in Battle" dialog if it appears.

 

If you like, you can check it out here: https://www.dropbox.com/s/sjur1pw1dszq2hi/GarageOpener.zip

Share this post


Link to post
Share on other sites

Nice. It worked well. Only towards the end, it closed my TO player... :O

Also, I was wondering if you could make that happen silently... I mean... without opening paint or interrupting your game.

 

Btw, I finalized my Garage Opener. Its and AHK and an EXE. The ahk file waits for the hotkey... Ctrl + G and when those keys are pressed, it runs the exe. The exe scans the screen for the inactivated garage button. And if found, it clicks on it and then clicks "Yes" in the "Stay in Battle" dialog if it appears.

 

If you like, you can check it out here: https://www.dropbox.com/s/sjur1pw1dszq2hi/GarageOpener.zip

Nice, are you starting to get the hang of AHK? :)

Share this post


Link to post
Share on other sites

Nice. It worked well. Only towards the end, it closed my TO player... :o

Also, I was wondering if you could make that happen silently... I mean... without opening paint or interrupting your game.

 

Hmm, maybe change this part to this...

 

 

Else

    {

    SendInput, {ctrl down}v{ctrl up}

    send, !fa

    WinWait, Save As

    scrn = %cUsr%\Screens\%TimeString%

    SendInput, %scrn%

    sleep, 300

    sendInput, {enter}

    sleep, 800

    Send, !fx

    }

 

 

 

Nope. I'm not that good to get it running silently. If I could work that out I'd have a different job!

 

 

Btw, I finalized my Garage Opener. Its and AHK and an EXE. The ahk file waits for the hotkey... Ctrl + G and when those keys are pressed, it runs the exe. The exe scans the screen for the inactivated garage button. And if found, it clicks on it and then clicks "Yes" in the "Stay in Battle" dialog if it appears.

 

If you like, you can check it out here: https://www.dropbox.com/s/sjur1pw1dszq2hi/GarageOpener.zip

Well I'll try it on another pc when I get the chance. Interesting about scanning for the battles button. I tried using autohotkey for this once and couldn't get it working so abandoned the idea. Does it work for all resolutions and depths etc?

Share this post


Link to post
Share on other sites

Hmm, maybe change this part to this...

 

 

Else

{

SendInput, {ctrl down}v{ctrl up}

send, !fa

WinWait, Save As

scrn = %cUsr%\Screens\%TimeString%

SendInput, %scrn%

sleep, 300

sendInput, {enter}

sleep, 800

Send, !fx

}

 

 

 

Nope. I'm not that good to get it running silently. If I could work that out I'd have a different job!

 

 

Well I'll try it on another pc when I get the chance. Interesting about scanning for the battles button. I tried using autohotkey for this once and couldn't get it working so abandoned the idea. Does it work for all resolutions and depths etc?

Oh, and BTW, AbsoluteZero, RRMI and I are working on a top secret project..... :D

It's going to be a surprise..... ;)

Share this post


Link to post
Share on other sites

 

Nice, are you starting to get the hang of AHK?  :)

Kind of. Lol.  :P I think, being introduced to Ahk made me think of ideas for my program in a totally new view! :) I gotta thank you for that.

 

Hmm, maybe change this part to this...

(code)

Oh. That worked! Nice.  :)

 

Nope. I'm not that good to get it running silently. If I could work that out I'd have a different job!

 

 

Well I'll try it on another pc when I get the chance. Interesting about scanning for the battles button. I tried using autohotkey for this once and couldn't get it working so abandoned the idea. Does it work for all resolutions and depths etc?

 And what company would you be working for? XD

 

Autohotkey did not have the search function when I went through the manual. However, it did have a "search for pixel" option which wasn't that helpful in this case.

Yes, it works for all resolutions, when the window is fullscreen, not fullscreen, maximized, resized to a smaller size and so on. Basically as long as the garage button is visible on your screen, it works. So for example, it won't work if the window is minimized to the taskbar.

And since, what I've posted is part of my program, it will display a message saying that it has not been run from TOT (my program). However, if activated within TOT, it works silently!  ;)

Share this post


Link to post
Share on other sites

Oh. That worked! Nice.  :)

Yep, active window and timings issue. It worked fine on mine.

 

And since, what I've posted is part of my program, it will display a message saying that it has not been run from TOT (my program). However, if activated within TOT, it works silently!  ;)

Not sure either what ^ meant. Tanki online tools i get, but not sure what you're getting at.

 

And, not sure who I would be working for but it would be double my pay surely or are programmers that poorly paid these days I needn't bother?

 

I had a look at the pixel image search again and I may have got it working for 1920 resolutions and down. If doesn't work on resolutions higher than that then that's because I didn't capture it at those resolutions probably. I saved them as bmp this time instead of jpeg. Maybe that's the reason it worked this time around.

 

It was a bit tricky because before GW just remembered it's sequence now it relies on the garage button image. What it does mean now is, there is less likely to be selection errors because you can't send any selections before the garage has properly loaded.

 

while gIn = 0      ; loop while garage inactive and break when gIn = 1

    GoSub, Status

 

I'll give it some testing before uploading.

 

It will be next week sometime when I can test yours.

 

az

Share this post


Link to post
Share on other sites

Thanks bro. I edited the Garage Opener script myself as I play on fullscreen.

Are you thanking me or AbsoluteZero? :huh:

If you are thanking me, you're welcome.... :D

Share this post


Link to post
Share on other sites

This topic is now closed to further replies.
 Share

×
×
  • Create New...