Illegal Character Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
zayntheboss
Posts: 14
Joined: 24 Feb 2019, 15:21

Illegal Character

22 Apr 2019, 08:37

I get an illegal character error when I try to run this script. Can someone please explain why?

In the inputbox that comes up, you're supposed to write the name of some US university (e.g., central michigan university)

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

pwb := ComObjCreate("InternetExplorer.Application")
pwb.visible := true
pwb.toolbar := false
numberlink := 21
num = 1

InputBox query
StringReplace, search, query, %A_Space%, `%20, all
navigate = https www.studyblue.com /#search/classes/%search%/scope=ALL  Broken Link for safety
MsgBox % navigate
pwb.navigate(navigate)
while pwb.ReadyState != 4
	Sleep, 100

Loop, 10 {
	
	queryselected = "#course-list-items > div:nth-child(%num%) > div > a"
	cards = "#shared-content-view > section > div > div > div.document-list > div > div:nth-child(%num%) > span.new-study-item__title.js-title-text > a"
	counter = "#course-list-items > div:nth-child(%num%) > span.list-item-option.study-item-metric.span2.offset4"
	
	if (pwb.document.querySelector(%counter%).innerText > 0) {
		;do stuff
	}
	num := num + 1
	pwb.navigate(navigate)
}
zayntheboss
Posts: 14
Joined: 24 Feb 2019, 15:21

Re: Illegal Character  Topic is solved

22 Apr 2019, 09:35

nvm I got it

Code: Select all

pwb := ComObjCreate("InternetExplorer.Application")
pwb.visible := true
pwb.toolbar := false
numberlink := 21
num = 1

InputBox query
StringReplace, search, query, %A_Space%, `%20, all
navigate = https www.studyblue.com /#search/classes/%search%/scope=ALL  Broken Link for safety
MsgBox % navigate
pwb.navigate(navigate)
while pwb.ReadyState != 4
	Sleep, 100


msgbox % pwb.document.querySelectorAll("span.list-item-option.study-item-metric.span2.offset4")[0].innerText
msgbox % pwb.document.querySelectorAll("span.list-item-option.study-item-metric.span2.offset4")[1].innerText
msgbox % pwb.document.querySelectorAll("span.list-item-option.study-item-metric.span2.offset4")[2].innerText

Return to “Ask For Help”

Who is online

Users browsing this forum: Chunjee, jgcampbell300, millansoft and 262 guests