Jump to content

Basic - Autoit script Help


 Share

Recommended Posts

  • Developers

Hello, im trying to Write a script to have it Hold W and F Down (Always) and have it Press Shift for 2 seconds and release Repeat

Any help or can i not do this?

Don't know if you can't do it... did you try?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

yea im still new to writing and tying to learn - This is what i have atm

Global $Paused

HotKeySet("{END}", "TogglePase")

HotKeySet("{HOME}", "Terminate")

While 1

Sleep(3)

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

SEND ("{W}")

SEND ("{D}")

While $Paused

Send ("{SHIFT}")

Sleep (300)

WEnd

EndFunc

Func Terminate()

Exit 0

EndFunc

Atm this isnt working and getting a Error upon trying - "Im not even sure I wrote it right / Like i said trying to learn"

Link to comment
Share on other sites

  • Developers

yea im still new to writing and tying to learn - This is what i have atm

Atm this isnt working and getting a Error upon trying - "Im not even sure I wrote it right / Like i said trying to learn"

Load the full version of SciTE4AutoIt3 it will run au3check to help with the syntax and run Tidy to format your code.

This is the tidy output:

Global $Paused
HotKeySet("{END}", "TogglePase")
HotKeySet("{HOME}", "Terminate")
While 1
    Sleep(3)
WEnd
Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Send("{W}")
        Send("{D}")
        While $Paused
            Send("{SHIFT}")
            Sleep(300)
        WEnd
;### Tidy Error -> "endfunc" is closing previous "while" on line 9
    EndFunc   ;==>TogglePause
;### Tidy Error -> func Not closed before "Func" statement.
;### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
    Func Terminate()
        Exit 0
    EndFunc   ;==>Terminate
;### Tidy Error -> func is never closed in your script.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

yea im still new to writing and tying to learn - This is what i have atm

Global $Paused

HotKeySet("{END}", "TogglePase")

HotKeySet("{HOME}", "Terminate")

While 1

Sleep(3)

WEnd

Func TogglePause()

$Paused = NOT $Paused

While $Paused

SEND ("{W}")

SEND ("{D}")

While $Paused

Send ("{SHIFT}")

Sleep (300)

WEnd

EndFunc

Func Terminate()

Exit 0

EndFunc

Atm this isnt working and getting a Error upon trying - "Im not even sure I wrote it right / Like i said trying to learn"

The script will not progress beyond the first loop as there is no exit some examples of Loops

$i = 0

While 1

$i += 1

Sleep(1000)

If $i = 100 Exitloop

WEnd

or

$i = 0

Do

$i += 1

Sleep(1000)

If $i = 100 Exitloop

Until $i = 10

Link to comment
Share on other sites

  • Developers

i downloaded the Full version, where is Tidy located?

You made a fundamental mistake. There cannot be enough time between the download and installation for you to actually have a look around, open the helpfile that comes with it and trying to help yourself before asking. :D

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

What are you talking about? Telling me i havnt looked around, iv had the Full version for like 6 month if not longer and iv aready looked on at the help file. if i would have found out how to Solve the issue i wouldnt have came on here to Ask if someone wouldnt mind helping. If you dont want to Help then dont post.. Sorry im New = I dont know everything, if i did i wouldnt be here..

But you dont have to be a Dick about it

Link to comment
Share on other sites

  • Developers

What are you talking about? Telling me i havnt looked around, iv had the Full version for like 6 month if not longer and iv aready looked on at the help file. if i would have found out how to Solve the issue i wouldnt have came on here to Ask if someone wouldnt mind helping. If you dont want to Help then dont post.. Sorry im New = I dont know everything, if i did i wouldnt be here..

But you dont have to be a Dick about it

Sure ... I always love it when the true person comes out... keep it coming and find out the consequences. :D

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

True Person? Frist off you dont know me..

Second, im actualy a nice person and ez going if actualy took the time to know me..

Sorry if i offended you, im just frustrated atm

I understand and am not mad at you yet but you have to understand that calling anybody a Dick on this forum isn't going to make too many friends.

I do realize I was "playing" with you with the remark I made but you do have to understand that we expect people to put in a little effort before posting.

You clearly didn't pass that criteria and all i did was tell you about it in a way you would understand and could have had a smile about.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I understand and am not mad at you yet but you have to understand that calling anybody a Dick on this forum isn't going to make too many friends.

I do realize I was "playing" with you with the remark I made but you do have to understand that we expect people to put in a little effort before posting.

You clearly didn't pass that criteria and all i did was tell you about it in a way you would understand and could have had a smile about.

Jos

Yea i normaly Dont call people names and what not.. normaly just blow it off and ingore it.

Little Effort ? what you mean by that tho? I am trying, last i check i thought it was some type of effort

Yea i understand im new to Trying to write scripts and trying to Understand it. But i havnt givin up yet..

Clearly i didnt understand what you were saying still, i have got the full verz of SciTE4AutoIt3 and Currently still running it.

If Tidy is a Program Built into the Script Editor, i havnt found it yet. If its not can i get the Link so i can get it?

Edited by TaurusDS
Link to comment
Share on other sites

Send("{SHIFT}") not gona work, use help file (or i need new version of autoit)

From scite "While" statement has no matching "Wend" statement

So how many "While" you have and how many "Wend" did you put to match them?

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

  • Developers

I have pointed you in the right direction.

Maybe others are willing to invest time in you but this Dick is done.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Send("{SHIFT}") not gona work, use help file (or i need new version of autoit)

From scite "While" statement has no matching "Wend" statement

So how many "While" you have and how many "Wend" did you put to match them?

Not sure - Iv changed it around trying to base it off a differnt Script i edited that works fine and i the same concept

Atm this i what it looks like

Global $Paused
HotKeySet("{END}", "TogglePause")
HotKeySet("{HOME}", "Terminate")
While 1
    Sleep(3)
WEnd
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Opt('SendKeyDownDelay',1000000000000)
        Send("{W}")
        Opt('SendKeyDownDelay',1000000000000)       
        Send ("{D}")
        Send ("{SHIFTDOWN}")
        Sleep (200)
        Send ("{SHIFTUP}")
        Sleep (100)
    WEnd
EndFunc
Func Terminate()
    Exit 0
EndFunc

But still is getting a Error

Edited by TaurusDS
Link to comment
Share on other sites

Should I be able to read your mind to see what error do you get? :D

The script is OK, you shouldn't get any errors on run.

yea, sorry. was a program fault - i found out it wasnt overwriting the current .au3 file for some reason.. so when i went to test it it would op up with the same error.. i got working now. thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...