This line does not contain a recognized action как исправить

  • Members
  • 112 posts
  • Last active: May 10 2015 09:30 AM
  • Joined: 07 Aug 2011

Starting up along with Windows system,my scripts keeps telling me :”Error at line 173. /Line Text: “” /Error: This line does not contain a recognized action.”
Though when I myself run it AFTER system startup,it just runs correctly and will not show me any “error”message !
Also,in fact, my scripts ONLY have 151 lines!Why it tells me “Error at line 173”?

Below is the error message:
—————————
AutoHotkey.ini
—————————
Error at line 173.

Line Text: “”
Error: This line does not contain a recognized action.

The program will exit.
—————————
Thank you!

#1

Posted 09 August 2011 – 07:26 AM

  • Back to top



garry

  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005

maybe look for directory / path , where is autohotkey.ini located
at first line in script should be
setworkingdir,%A_scriptdir%

#2

Posted 09 August 2011 – 07:33 AM

  • Back to top



ahkguy

  • Members
  • 112 posts
  • Last active: May 10 2015 09:30 AM
  • Joined: 07 Aug 2011

maybe look for directory / path , at first line in script should be
setworkingdir,%A_scriptdir%

Thank you!let me have a try.thanks!

#3

Posted 09 August 2011 – 07:34 AM

  • Back to top



ahkguy

  • Members
  • 112 posts
  • Last active: May 10 2015 09:30 AM
  • Joined: 07 Aug 2011

maybe look for directory / path , at first line in script should be
setworkingdir,%A_scriptdir%

Thank you!let me have a try.thanks!

I’v tried,but still the same error message. :(

#4

Posted 09 August 2011 – 07:39 AM

  • Back to top



garry

  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005

has something to do , that the path (xy.ini) not found ? ( otherwise syntax problems )
see also fullpath > %A_scriptdir%autohotkey.ini ( < your script created this ? )
your script works, when you start in the opened folder ?
try with msgbox to see where the failure can be
or can show your code

#5

Posted 09 August 2011 – 07:49 AM

  • Back to top



Lexikos

  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

Adding or changing SetWorkingDir in your script will not help if your script is not loading in the first place.

You must check which working directory is being used to run AutoHotkey.exe. If you’ve put a shortcut to AutoHotkey.exe in the Startup folder in the Start menu, check that the working directory shown in the shortcut’s properties is the directory which contains your AutoHotkey.ini.

Alternatively, you could search your computer for “autohotkey.ini” to ensure you have only one. If you do, try renaming it.

#6

Posted 09 August 2011 – 08:44 AM

  • Back to top



ahkguy

  • Members
  • 112 posts
  • Last active: May 10 2015 09:30 AM
  • Joined: 07 Aug 2011

Thanks Garry and Lexikos!
I tried to totally delete the file “autohotkey.ini”(which is under the same directory with “AutoHotkey.exe”)and create a “autohotkey.ahk”(same codes with autohotkey.ini) file under “C:UsersJCDocuments”(I remember this is the default directory where my scripts were saved under when I ran autohotkey and edited<created> my scripts the most first time).Now it starts up correctly! No error message any more!
Thank you all!

#7

Posted 09 August 2011 – 10:22 AM

  • Back to top


Голосование за лучший ответ

жанна петрова

Мудрец

(12859)


7 лет назад

не находит путь укажи где ехе файл

,иван иванычЗнаток (314)

7 лет назад

как?

жанна петрова
Мудрец
(12859)
возможно отыскать каталог / путь, где это autohotkey.ini, расположенный
в первой строке в скрипте должно быть
setworkingdir,%A_scriptdir%

Маша СолодовникУченик (82)

4 года назад

что делать если при установке анк крмп пишет Returns parameter should be blank except inside a function

семейная командаУченик (195)

4 года назад

Как указать ?

Король

Профи

(589)


7 лет назад

Найди в компьютере.

savoljavob

Искусственный Интеллект

(170749)


7 лет назад

скачали
ОТСЮДА?

роман Гаптрахманов

Ученик

(237)


7 лет назад

у тебя ошибка в 3 строке. найди и устрани

Кирилл Афанасьев

Ученик

(105)


6 лет назад

Просто ставь пробел перед Send или SendInput

Рома Рома

Знаток

(275)


5 лет назад

Error at line 25. Line Text:Retner. Error:This line does not contain a recognized action. The program will exit. При запуске АНК такая фигня что делать до этого все работало и сейчас только при вставке это шаблона не пишит

Данил Филипов

Ученик

(107)


5 лет назад

Error at line 22. Line Text:Retner. Error:This line does not contain a recognized action. The program will exit. Раньше работала сейчас нет!

I want /*{TAB} to be changed into:

/*********************************

*********************************/

, so I can easily create a comment-block (in PHP). However, when I use

:*://`t::
/****************************************{ENTER}{TAB}
****************************************/{ENTER}{LEFT 38}
return

It returns some error. 🙁

How to fix this?

asked Nov 16, 2011 at 17:45

Aart den Braber's user avatar

Aart den BraberAart den Braber

8561 gold badge11 silver badges22 bronze badges

1

You’re close… The reason for the error “this line does not contain a recognized action” is that you’re not telling AutoHotKey what to do with the text, i.e. you need to add Send commands to the start of each line.

This is quite a lot closer:

::/**::
    Send, /*********************************{ENTER}{TAB}{ENTER}
    Send, ****************************************/{ENTER}{LEFT 38}
Return

Things to mention:

  • It actually uses **space to activate it, rather than the *Tab that you wanted. This is because I couldn’t get the text editor I was using to pass the Tab character through to AutoHotKey.
  • Depending on how your editor handles the 2nd {ENTER}, you might need to add some backspaces, to delete auto-indentation at the start of the next line.

answered Nov 16, 2011 at 22:38

Clare Macrae's user avatar

Clare MacraeClare Macrae

3,6602 gold badges31 silver badges45 bronze badges

1

Ok, I figured it out myself. If someone needs the same: I used:

:*:/*`t::
/{+8}****************************************************{ENTER}{TAB}{ENTER}{LEFT}
****************************************************/{ENTER}{LEFT 57}
return

Enjoy!

answered Nov 17, 2011 at 18:10

Aart den Braber's user avatar

Aart den BraberAart den Braber

8561 gold badge11 silver badges22 bronze badges

0

To fix the "#Include file dataClass_CustomFont.ahk cannot be opened." error when launching the script from within another AHK script, you can do one of the following to resolve the issue:

Option 1:
Set the working directory of the first AHK file to the folder containing the script, then run the script

SetWorkingDir, C:pathtoyourworkingdirectory
Run, C:pathtoyourscript.ahk

So, if your script is located in C:Users%UserName%DocumentsPOE ToolsLailloken-UI, this becomes:

SetWorkingDir, %UserProfile%DocumentsPOE ToolsLailloken-UI
Run, %UserProfile%DocumentsPOE ToolsLailloken-UILailloken UI.ahk

Option 2:
Use the ‘WorkingDir’ parameter in the ‘Run’ command when calling the script

Run, C:pathtoyourscript.ahk, C:pathtoyourworkingdirectory

As above, this becomes:

Run, %UserProfile%DocumentsPOE ToolsLailloken-UILailloken UI.ahk, %UserProfile%DocumentsPOE ToolsLailloken-UI

I’m currently trying to write an Autohotkey command, which pastes a SQL code, but i only get this message:

Error at line 3. Line Text: Create table #tmp (
Error: This line does not contain a recognized action.
The script was not reloaded; the old Version will remain in effect.

there are also some variations of this message.

I already tried to use SendRaw or SendInput. Even the escape character ´ does not work. Putting it in quotation marks neither. I do not have any clues anymore.

:*:sql::
(
--drop table #tmp 
Create table #tmp (
    Refnr int identity (1,1) not null, 
    row1 varchar(8000) null, 
    number int null 
    )
insert into #tmp (row1, number)
select top 20 row1, count(*) from tableA 
group by row1 
order by 2 desc
select * from #tmp order by 3 desc
)

well, i expected it to send the SQL-Statement, but I’m just getting errors like the one above. Sometimes it refers to the line “Create Table #tmp(“, sometimes to “insert into #tmp (row1, number)”. And I don’t know what to do.
Does anyone has a clue and can help me with this?

Добавить комментарий