- 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
Содержание
- Error at line 1 ?
- Error at line 1 Line Text.
- «Error at line 1» with Unicode
- Error: This line does not contain a recognized action?
- error at line 1 autohotkey
- Comments
- quinnjamin commented Dec 8, 2014
- This comment has been minimized.
- valleyman86 commented Dec 14, 2014
Error at line 1 ?
When executing AutoHotkey, I run into this error when I just start.
Error at line 1.
Error: This line does not contain a recognized action.
I’ve tried in vain:
— Remove most of the scripts in the file
— Save the file as «UTF-8» and «Unicode»
How could I solve this problem ?
- Moderators
- 3263 posts
Last active: Feb 01 2015 09:49 AM
- Joined: 04 Jun 2010
Are you running AutoHotkey or are you running a script that needs autohotkey?
and, just in case, make sure to download the latest version of AutoHotkey from
The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos — 1) Good, 2) Fast 3) Cheap — pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter KeyLooperDemo Key Spammer TinyClickRecorder GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
- Members
- 10 posts
Last active: Feb 02 2017 11:03 PM
- Joined: 30 Jan 2014
Are you running AutoHotkey or are you running a script that needs autohotkey?
and, just in case, make sure to download the latest version of AutoHotkey from
I’m running AutoHotkey.
I even empty the whole file to avoid any possible error. And I still have the same problem.
Question: how can I know which text (script) file that AutoHotKey is using, i.e. the location of the file ? Please have in mind that I can’t launch AutoHotKey at all.
By the way, since this is a Corpo laptop, I can’t install another version. My actual version is 1.048.05
Thank you for your help.
- Moderators
- 3263 posts
Last active: Feb 01 2015 09:49 AM
- Joined: 04 Jun 2010
Whenever you start the AutoHotkey exe directly without giving it a script to run it automatically tries to run
a script named Autohotkey.ahk. To run individual scripts you have to create them with a text editor, save them
to some location where AutoHotkey.exe can find them, and make sure that the .ahk extension is associated with
AutoHotkey. Failing that you can start AutoHotkey.exe with a script name as an argument. That way is a pain
in the hindquarters tho. Ok you’re using the early version of AutoHotkey (v1.0.48.05). The current version is
1.1.16.05. There are a lot of changes between the two versions and you might want your corpo IT guys to let
you download and set up the new version. Failing that you might want to rename the AutoHotkey.ahk file to
something else and start building your own scripts. A lot of the scripts you’ll find on the forums use new
techniques that your version can’t handle.
The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos — 1) Good, 2) Fast 3) Cheap — pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter KeyLooperDemo Key Spammer TinyClickRecorder GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
- Members
- 10 posts
Last active: Feb 02 2017 11:03 PM
- Joined: 30 Jan 2014
I can finally install the new version (1.1.16.05) on my laptop. Autohotkey can start, but it can’t replace the words correctly like it used to be.
The accents don’t show up anymore.
người is shown up incorrectly as nguoi
vừa is show up incorrectly as v?a
It worked very well on my previous laptop.
I use NotePad to save the file as Unicode or UTF-8. It doesn’t let me save as ANSI.
Источник
Error at line 1 Line Text.
I’m getting this error:
Error at line 1 Line text: . . # This line does not contain a recognized action
when trying to open AHK. Any idea what this means?
[Moderator’s note: Moved topic from Issues to Support.
- Moderators
- 8510 posts
Last active: Sep 10 2015 05:50 AM
- Joined: 08 Apr 2009
Line Text: z
Error: This line does not contain a recognized action.
- Guests
Last active:
- Joined: —
You seem to purposely have left out the pertinent info, so I can’t give any more help.
Not when the first line is only 2 dots: ..
You should start thinking with a positive mindset .
- Moderators
- 8510 posts
Last active: Sep 10 2015 05:50 AM
- Joined: 08 Apr 2009
You seem to purposely have left out the pertinent info, so I can’t give any more help.
Not when the first line is only 2 dots: ..
You should start thinking with a positive mindset .
Источник
«Error at line 1» with Unicode
I have this script that used to run without problems before I reinstalled my system (Windows 7 64-bit).
Now when I save it as Unicode, it won’t run and gives me the following message:
Error at line 1.
Error: This line does not contain a recognized action.
However, the script doesn’t contain these characters. It starts with a normal line (#ifwinactive, . ).
And when I save it as ANSI or UTF-8 it works fine, except for not recognizing the Unicode characters correctly, of course.
I tried to copy paste the script into another script, or saving it with another text program, it’s always the same.
- Members
- 2475 posts
Last active: Feb 18 2015 04:57 PM
- Joined: 01 Dec 2013
When you save a file in UTF-16, the system puts a BOM (Byte order Mark) as the first characters of the file (ÿþ).
You run the old AutoHotkey version (1.0.48.05) from this site.
Download the lastest version from ahkscript.org.
Si ton labeur est dur et que tes résultats sont minces, souviens toi du grand chêne qui avant n’était qu’un gland. comme toi ! (anonyme)
L’art de lire, c’est l’art de penser avec un peu d’aide. (É. Faguet)
Windows 3.1. Collector’s Edition. ( www.avaaz.org )
- Members
- 2 posts
Last active: Aug 20 2014 10:30 PM
- Joined: 20 Aug 2014
Oh, that’s it? This site looks way more polished and up to date.
Источник
Error: This line does not contain a recognized action?
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»?
Line Text: «»
Error: This line does not contain a recognized action.
- Spam Officer
- 3219 posts
Last active: Sep 20 2018 02:47 PM
- Joined: 19 Apr 2005
- 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%
- 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!
- Spam Officer
- 3219 posts
Last active: Sep 20 2018 02:47 PM
- Joined: 19 Apr 2005
- 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.
Источник
error at line 1 autohotkey
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.
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?
Copy link Quote reply
At first it says «Error at line 15. The following variable name contains an illegal character: «File.Length» The program will exit.» I the only way i could get it to go away was to delete the period (.) but then it says «Error at line 21. Line Text: #If WinActive(«ahk_exe csgo.exe») Error: This line does not contain a recognized action. The program will exit.» I’m just having great difficulty getting this to work, I have never used anything like this (scripts or AutoHotKey) If you could help me it would be greatly appreciated!
Copy link Quote reply
Make sure you get the latest version of autohotkey.
On Sunday, December 7, 2014, quinnjamin notifications@github.com wrote:
At first it says «Error at line 15. The following variable name contains
an illegal character: «File.Length» The program will exit.» I the only way
i could get it to go away was to delete the period (.) but then it says
«Error at line 21. Line Text: #If WinActive(«ahk_exe csgo.exe») Error: This
line does not contain a recognized action. The program will exit.» I’m just
having great difficulty getting this to work, I have never used anything
like this (scripts or AutoHotKey) If you could help me it would be greatly
appreciated!
—
Reply to this email directly or view it on GitHub
#1.
Thread Tools
Display
- Linear Mode
- Switch to Hybrid Mode
- Switch to Threaded Mode
Yeah maybe I’ll try that, I was thinking about it but thought it might take him off /follow but it doesn’t. I kind of wanted something that I didn’t have to conciously do every couple minutes but I guess jumping a couple times every 5 minutes isn’t hard lol.
EDIT: Meh.
This seems to work just fine. Dunno what I did wrong last time o.O
Numpad0::ControlSend, , , ahk_id %idClone%
Numpad0 Up::ControlSend, , , ahk_id %idClone% [/code:1]
I have this problem with ahk. Currently I’m testing with two computers: a normal desktop pc and a laptop. I’m running two wow clients on both of them so I have four characters now. Main character is A which ofcourse runs on my primary computer. On the same computer is also other char which is B. Char C is fullscreen client on my laptop and D is minimized client. I’m using Synergy/Multibox (both of them seems to work exactly the same in WoW) to broadcast my keys from desktop pc to laptop. So A and C which are on fullscreen work just fine but B and D causes some problems.
I’ve been searching some scripts from this forum but no matter which one I use it does not work properly. For example I have Frost Armor binded to «1». When I hold 1 down on my keyboard B and D casts their frost armor instantly and keep casting it as long as the button is hold down. A and C in the other hand cast it only after the button is released, which is ofcourse how it should work. So the problem is that ahk keeps spamming the button up and down as long as I keep it pressed down. Any ideas?
The scripts I’ve tested this with:
1::
ControlSend, , , ahk_id %idClone%
1 Up::
ControlSend, , , ahk_id %idClone%
[/code:1]
[code:1]#IfWinActive, World of Warcraft
2::
;ControlSend,, , ahk_id %idMain%
ControlSend,, , ahk_id %idClone%
KeyWait, 2
;ControlSend,, , ahk_id %idMain%
ControlSend,, , ahk_id %idClone%
Return[/code:1]
[code:1]#IfWinActive, World of Warcraft
Источник
Страницы 1
Чтобы отправить ответ, вы должны войти или зарегистрироваться
1 2016-10-25 15:53:54 (изменено: Autosql, 2016-10-25 15:55:32)
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Тема: AHK: Ошибка character некорректная запись в коде
Привет.
Подскажите, что не так написано в коде, почему такая ошибка, что от меня хочет autohotkey
Пробую сделать код в таком виде:
14 Vibor :={Yes: ""//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='t']"", ; ДА
15 No: ""//div[@data-id='98E010E0346BF63A895B3FAE37A']//input[@value='f']"", ; НЕТ
16 tip1: ""//div[@data-id='1F8A94A91DD8BDf368B69A11AB7']//input[@value='0']"",; Тип 1
17 tip2: ""//div[@data-id='1F8A94A91DD264D38B69A11AB7']//input[@value='1']"", ; Тип 2
18 tip3: ""//div[@data-id='1F8A94A91DD2640138B69A11AB7']//input[@value='2']"" ; Тип 3
19 }
—————————
При запуске показывает ошибку.
Как я понял ругается на символ ‘
Error at line 14.
Line Text: '98E010E03463FA45645dwd3E37A'
Error: The leftmost character above is illegal in an expression.
Пробовал брать его в кавычки {‘}
Тогда показывает немного другую ошибку.
Error at line 14.
Line Text: '
Error: The leftmost character above is illegal in an expression.
Я не пойму что он от меня хочет.
Цель:
Когда я в коде запрошу этот параметр, например
driver.findElementByXPath(Vibor.Yes).click
Чтобы в итоге получить как бы, такую строчку.
driver.findElementByXPath("//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='t']").click
Чтобы был сделан реальный переход.
Надеюсь объяснил нормально.
Как я понимаю нужно какие-то из спец символов обнести кавычками.
Или я точно не пойму что нужно.
2 Ответ от Drugoy 2016-10-25 16:24:37
- Drugoy
- Заблокирован
- Неактивен
Re: AHK: Ошибка character некорректная запись в коде
Вместо удвоенных двойных кавычек попробуйте использовать однократные двойные кавычки, иначе
//div[@data-id=’98E010E03463FA45645dwd3E37A’]//input[@value=’t’]
трактуется как выражение, а не как строка.
3 Ответ от Autosql 2016-10-25 17:25:30 (изменено: Autosql, 2016-10-25 17:27:45)
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
Если сделать без двойных кавычек, тогда показывается такая ошибка.
Error at line 15.
Line Text: No: "//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='f']",
Error: This line does not contain a recognized action.
или такой вариант. с 1 кавычкой, и тогда одинарную кавычку в середине кода нужно закрыть таким кодом {‘} иначе не понятно где начало где конец. но как видим так же не помогло
Line Text: CreditYes: '//div[@data-id={'}98E010E03463FA45645dwd3E37A{']]//input[@value={']t{'}]...
Error: This line does not contain a recognized action.
4 Ответ от Malcev 2016-10-25 17:59:22
- Malcev
- Разработчик
- Неактивен
Re: AHK: Ошибка character некорректная запись в коде
Вместо:
Yes: ""//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='t']""
Надо:
Yes: """//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='t']"""
5 Ответ от teadrinker 2016-10-25 18:18:13
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
Autosql пишет:
14 Vibor :={Yes: ""//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='t']"", ; ДА 15 No: ""//div[@data-id='98E010E0346BF63A895B3FAE37A']//input[@value='f']"", ; НЕТ 16 tip1: ""//div[@data-id='1F8A94A91DD8BDf368B69A11AB7']//input[@value='0']"",; Тип 1 17 tip2: ""//div[@data-id='1F8A94A91DD264D38B69A11AB7']//input[@value='1']"", ; Тип 2 18 tip3: ""//div[@data-id='1F8A94A91DD2640138B69A11AB7']//input[@value='2']"" ; Тип 3 19 }
Во-первых, не нужно в теге code вставлять номера строк, код должен быть в том виде, в котором его можно запустить. Во-вторых, неправильный синтаксис переноса строк — запятая должна быть перенесена на новую строку:
Vibor := { Yes: """//div[@data-id='98E010E03463FA45645dwd3E37A']//input[@value='t']""" ; ДА
, No: """//div[@data-id='98E010E0346BF63A895B3FAE37A']//input[@value='f']""" ; НЕТ
, tip1: """//div[@data-id='1F8A94A91DD8BDf368B69A11AB7']//input[@value='0']""" ; Тип 1
, tip2: """//div[@data-id='1F8A94A91DD264D38B69A11AB7']//input[@value='1']""" ; Тип 2
, tip3: """//div[@data-id='1F8A94A91DD2640138B69A11AB7']//input[@value='2']""" } ; Тип 3
MsgBox, % Vibor.Yes
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
6 Ответ от Autosql 2016-10-25 18:55:31 (изменено: Autosql, 2016-10-25 18:56:59)
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
ох.
Спасибо. Оказалось как всегда запятая не там
А номера строк я написал, чтобы видно было на какую строчку ошибка идет.
А зачем аж 3 кавычки ? » » » как они описываются ?
1 кавычка это которая мне нужна.
2 кавычка это которая закрывает
3 кавычка что делает ?
7 Ответ от teadrinker 2016-10-25 18:59:57
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
Autosql пишет:
А номера строк я написал, чтобы видно было на какую строчку ошибка идет.
Это можно в комментарии написать.
Autosql пишет:
А зачем аж 3 кавычки ? » » » как они описываются ?
Когда кавычка подразумевается, как литерал, она должна просто удваиваться. Т. е. первая — открывающая, вторая — предваряющая, показывающая, что следующая — текстовая.
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
8 Ответ от teadrinker 2016-10-25 19:01:46
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
Пример:
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
9 Ответ от Kurskador 2016-10-25 21:55:43
- Kurskador
- Участник
- Неактивен
- Рейтинг : [1|0]
Re: AHK: Ошибка character некорректная запись в коде
Чтобы вывести икс в кавычках:
10 Ответ от Autosql 2016-10-26 11:04:11
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
Понятно.
Ох я неудачник )) Сделал все как описал. Запустился скрипт. Но упал на переносе переменной.
Получился такой код:
#SingleInstance, Force
#Persistent
Random, rnd, 100,999
Vibor := {Create: "//a[@data-id='94F53529BB3C3800DEC277841279D79']" ; C
, Yes: """//div[@data-id='98E010E0346B3B9393863A895B3FAE37A']//input[@value='t']""" ; ДА
, No: """//div[@data-id='98E010E0346B3B9393863A895B3FAE37A']//input[@value='f']""" ; НЕТ
, tip1: """//div[@data-id='1F8A94A91DD264012DB68B67669A11AB7']//input[@value='0']""" ; Г
, tip2: """//div[@data-id='1F8A94A91DD264012DB55368B69A11AB7']//input[@value='1']""" ; З
, tip3: """//div[@data-id='1F8A94A91DD264012DB35558B69A11AB7']//input[@value='2']""" } ; С
;запустили селениум
driver := ComObjCreate("Selenium.ChromeDriver")
;перешли по ссылке
driver.Get("https://yandex.ru")
;нашли кнопку
driver.findElementByXPath("Vibor.Create").click
Сайт указываю яндек. делаю на внутреннем сайте без доступа вне.
Пишет ошибку:
Error: 0xA00A0007 -
Source: Selenium
Description: NoSuchElementError
Element not found for XPath=Vibor.Create
HelpFile: (null)
HelpContext: 0
Specifically: findElementByXPath
Line#
---> 050: driver.findElementByXPath("Vibor.Create").click
053: driver.findElementByXPath(Vibor.Yes).click
Я пробовал 2 варианта передачи.
1:
"//a[@data-id='94F53529BB3C3800DEC277841279D79']"
driver.findElementByXPath(«Vibor.Create»).click
2:
"""//a[@data-id='94F53529BB3C3800DEC277841279D79']"""
Но в driver.findElementByXPath(Vibor.Create).click убирал кавычки
Но оба варианта не прокатили.
Что я не так делаю не пойму?
Например если пробую вывести это в строку, то все ок.
zz := Vibor.Yes
send %zz%
11 Ответ от Malcev 2016-10-26 12:28:23
- Malcev
- Разработчик
- Неактивен
Re: AHK: Ошибка character некорректная запись в коде
Это:
Create: "//a[@data-id='94F53529BB3C3800DEC277841279D79']"
driver.findElementByXPath("Vibor.Create").click
замените на:
Create: """//a[@data-id='94F53529BB3C3800DEC277841279D79']"""
driver.findElementByXPath(Vibor.Create).click
12 Ответ от Autosql 2016-10-26 12:38:05 (изменено: Autosql, 2016-10-26 12:39:48)
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
Поменял.
Показалась немного другая ошибка.
Error: 0xA00A0020 -
Source: Selenium
Description: InvalidSelectorError
invalid selector: Unable to locate an element with the xpath expression "//a[@data-id='94F13529BB3C380D79']" because of the following error:
TypeError: Failed to execute 'evaluate' on 'Document': The result is not a node set, and therefore cannot be converted to the desired type.
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=
Specifically: findElementByXPath
Если подставить код по старинке, то отрабатывает клик.
driver.findElementByXPath("//a[@data-id='94F13529BB3C380D79']").click
13 Ответ от teadrinker 2016-10-26 12:57:55
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
Поместите ключи в объекте Vibor в обычные одинарные кавычки. Просто изначально неправильно вас понял.
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
14 Ответ от Autosql 2016-10-26 13:07:47 (изменено: Autosql, 2016-10-26 13:09:04)
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
Если так.
driver.findElementByXPath(Vibor.'Create').click
То ошибка.
Line Text: 'Create'
Error: The leftmost character above is illegal in an expression.
——-
У меня сейчас получается так:
Vibor := {Create: """//a[@data-id='94F13529BB3C3800D2A0AAED09EC277841279D79']"""}
...
driver.findElementByXPath(Vibor.'Create').click
15 Ответ от teadrinker 2016-10-26 14:08:36
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
Правильно так:
Vibor := {Create: "//a[@data-id='94F13529BB3C3800D2A0AAED09EC277841279D79']"}
driver.findElementByXPath(Vibor.Create).click
Если выдаёт какую-то ошибку, то дело не в синтаксисе, может, значение неверно указали.
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
16 Ответ от teadrinker 2016-10-26 14:12:04
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
Autosql пишет:
Если подставить код по старинке, то отрабатывает клик.
driver.findElementByXPath("//a[@data-id='94F13529BB3C380D79']").click
У вас тут
//a[@data-id=’94F13529BB3C380D79′]
а в ключе
//a[@data-id=’94F13529BB3C3800D2A0AAED09EC277841279D79′]
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
17 Ответ от Autosql 2016-10-26 15:22:04
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
То что разница в ключе, это я просто сокращал, чтобы строка была меньше тут в тексте
Попробовал такой вариант:
Vibor := {Create: "//a[@data-id='94F13529BB3C3800D2A0AAED09EC277841279D79']"}
driver.findElementByXPath(Vibor.Create).click
Вроде сработало.
Спасибо. Буду дальше пробовать.
18 Ответ от Autosql 2016-10-26 16:59:29 (изменено: Autosql, 2016-10-27 12:44:13)
- Autosql
- Участник
- Неактивен
- Рейтинг : [0|0]
Re: AHK: Ошибка character некорректная запись в коде
19 Ответ от teadrinker 2016-10-26 17:25:41
- teadrinker
- Администратор
- На форуме
Re: AHK: Ошибка character некорректная запись в коде
У нас принято правило: одна тема — один вопрос. Создавайте новую, желательно с внятным названием.
Разработка AHK-скриптов:
e-mail dfiveg@mail.ru
Telegram jollycoder
Страницы 1
Чтобы отправить ответ, вы должны войти или зарегистрироваться