ikyf3

error _ispressed (4C)

17 posts in this topic

If _IsPressed("4C",$dll)Then
 
 FileWrite ("risultati.txt","l")
 
 EndIf
 
 While _IsPressed(4C) = 1
 
 WEnd
 
 WEnd
I insert this code and when i play the script show an error : unable to parse line   while _ispressed(4C) = 1     while _ispressed(^ERROR
 
in the script in the buttom there isn't error
 
If _IsPressed("41",$dll)Then
 
    FileWrite ("risultati.txt","a")
 
   EndIf
 
While _IsPressed(41) = 1
 
WEnd
 
help me plese
 

Share this post


Link to post
Share on other sites



the same error in this part

 If _IsPressed("51",dll)Then
 
 FileWrite ("risultati.txt","q")
 
 EndIf
 
 While  _IsPressed(52) = 1
 
WEnd

Share this post


Link to post
Share on other sites

Where is your _Ispressed() Func as that is not a native function?
Do you have this line in your script?:

#include <Misc.au3>


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

there is the complete script

#include<misc.au3>
 
    $Dll=DllOpen("user32.dll")
 
While 1
 
 
 
If _IsPressed("41",$dll)Then
 
    FileWrite ("risultati.txt","a")
 
   EndIf
 
While _IsPressed(41) = 1
 
WEnd
 
 
 
If _IsPressed("42",$dll)Then
 
    FileWrite ("risultati.txt","b")
 
   EndIf
 
While _IsPressed(42) = 1
 
WEnd
 
 
 
If _IsPressed("43",$dll)Then
 
    FileWrite ("risultati.txt","c")
 
   EndIf
 
While _IsPressed(43) = 1
 
 WEnd
 
 
 
if _IsPressed("44",$dll)Then
 
 FileWrite ("risultati.txt","d")
 
   EndIf
 
While _IsPressed(44) = 1
 
 WEnd
 
 
 
If _IsPressed("45",$dll)Then
 
    FileWrite("risultati.txt","e")
 
   EndIf
 
While _IsPressed(45) = 1
 
 WEnd
 
 
 
If _IsPressed("46",$dll)Then
 
    FileWrite ("risultati.txt","f")
 
   EndIf
 
While _IsPressed(46) = 1
 
WEnd
 
 
 
If _IsPressed("47",$dll)Then
 
    FileWrite ("risultati.txt","g")
 
 EndIf
 
While _IsPressed(47) = 1
 
WEnd
 
 
 
If _IsPressed("48",$dll)Then
 
    FileWrite ("risultati.txt","h")
 
 EndIf
 
 While _IsPressed(48) = 1
 
 WEnd
 
 
 
 If _IsPressed("49",$dll)Then
 
 FileWrite ("risultati.txt","i")
 
 EndIf
 
 While _IsPressed(49) = 1
 
 WEnd
 
 
 
 If _IsPressed("50",$dll)Then
 
 FileWrite ("risultati.txt","p")
 
 EndIf
 
 While _IsPressed(50) = 1
 
 WEnd
 
 
 
 If _IsPressed("51",$dll)Then
 
 FileWrite ("risultati.txt","q")
 
 EndIf
 
 While _IsPressed(51) = 1
 
WEnd
 
 
 
If _IsPressed("52",$dll)Then
 
    FileWrite ("risultati.txt","r")
 
 EndIf
 
 While _IsPressed(52) = 1
 
 WEnd

Share this post


Link to post
Share on other sites

I deled the error script, but i must have this script

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Here is your script run through Tidy:

#Tidy_Parameters=/rel
#include <misc.au3>
$Dll = DllOpen("user32.dll")
While 1
    If _IsPressed("41", $Dll) Then
        FileWrite("risultati.txt", "a")
    EndIf
    While _IsPressed(41) = 1
    WEnd
    If _IsPressed("42", $Dll) Then
        FileWrite("risultati.txt", "b")
    EndIf
    While _IsPressed(42) = 1
    WEnd
    If _IsPressed("43", $Dll) Then
        FileWrite("risultati.txt", "c")
    EndIf
    While _IsPressed(43) = 1
    WEnd

As you can see you are missing an Wend statements at the end.
I have no idea what you are trying to accomplish here so you ned to tell me first what you are doing.

Jos

PS: please post code with CodeTags like I did.

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

thanks

 

Share this post


Link to post
Share on other sites

there is the same error

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

What about you give us a little more information than "there is the same error"?

What error? What is the problem you see? What did you change in the script?

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

#10 ·  Posted (edited)

9 minutes ago, Jos said:

As you can see you are missing an Wend statements at the end.

Have you appended the missing Wend?

Edited by AutoBert

Share this post


Link to post
Share on other sites

while _is pressed(4A) = 1

while _ispressed(^ERROR

error:unable to parse line

Share this post


Link to post
Share on other sites
Just now, AutoBert said:

Have you appended the missing Wend?

yes

Share this post


Link to post
Share on other sites
Just now, Jos said:

What does the helpfile tell you how this should look?

Jos

yep

Share this post


Link to post
Share on other sites

yes

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