Jump to content

error _ispressed (4C)


 Share

Recommended Posts

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
 
Link to comment
Share on other sites

  • Developers

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

#include <Misc.au3>


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

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
Link to comment
Share on other sites

  • Developers

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

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

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

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
Just now, ikyf3 said:

while _is pressed(4A) = 1

What does the helpfile tell you how this should look?

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

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...