Sign in to follow this  
Followers 0
TaurusDS

Basic - Autoit script Help

19 posts in this topic

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?

Share this post


Link to post
Share on other sites



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?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

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.

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

i downloaded the Full version, where is Tidy located?

Share this post


Link to post
Share on other sites

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
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

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I'll give you a hint: check SciTE menus while an au3 file is opened.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

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

Share this post


Link to post
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.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0