Skype script stops rest of script from working Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zeroheaduo
Posts: 2
Joined: 22 Jan 2017, 18:05

Skype script stops rest of script from working

25 Sep 2017, 05:59

New words added below the Skype list script stop working. Need it to work.
Ideally, I would like both scripts to continue working in the same ahk file.
If anyone could help me, I would appreciate it. Thank you.

Code: Select all

:*:gernede::grenade
:*:clearning::clearing
::gig's::GB
{ 
#IfWinActive, Skype 
:*:hello::
list=HELLO, hi, Hey, sup,yo
listA:=strSplit(list, ",") ; A = Array
	random, choice, 1, % listA.maxIndex() ; random between 1 and the total item count.
	response:= trim(listA[choice])
	sendRaw, %response% ; send it, use raw to treat things like ! as ! instead of Alt.
return 
}
::gig::GB
::im::I'm
typing "gig" and "im" does not return "GB" and "I'm"
SirRFI
Posts: 404
Joined: 25 Nov 2015, 16:52

Re: Skype script stops rest of script from working  Topic is solved

25 Sep 2017, 06:39

#If affects hotkeys and hotstrings below it. That being said, every hotkey and hostring defined below #IfWinActive, Skype are affected by it. Define empty #If to make these defined below it unconditional again.

Also, consider using actual array rather than string You split afterwards to make an array.

Code: Select all

List := ["HELLO", "hi", "Hey", "sup", "yo"]
Use

Code: Select all

[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Dobbythenerd1 and 312 guests