Search found 520 matches

by sinkfaze
28 Mar 2019, 15:41
Forum: Ask for Help (v1)
Topic: How can I display an array with an Input or MsgBox? Topic is solved
Replies: 10
Views: 5280

Re: How can I display an array with an Input or MsgBox? Topic is solved

Your ugly code can be simplified:

Code: Select all

Loop, 25
{
	i :=	A_Index-1	; set var instance number
	FileReadLine, Message%i%, %Filename%, %LineNum%
	LineNum += 5
}
by sinkfaze
28 Mar 2019, 11:34
Forum: Ask for Help (v1)
Topic: Paste variables in a repeated cell pattern in Excel Topic is solved
Replies: 11
Views: 2672

Re: Paste variables in a repeated cell pattern in Excel Topic is solved

Code: Select all

xl :=	ComObjActive("Excel.Application")
xl.Range("A1:E3").Value :=	1
:?:
by sinkfaze
28 Mar 2019, 08:25
Forum: Ask for Help (v1)
Topic: What am I doing wrong here ? Variable is empty
Replies: 14
Views: 2917

Re: What am I doing wrong here ? Variable is empty

V: Variable. Associates a variable with a control. Immediately after the letter V, specify the name of a global variable (or a ByRef local that points to a global, or [in v1.0.46.01+] a static variable). For example, specifying vMyEdit would store the control's contents in the variable MyEdit whene...
by sinkfaze
27 Mar 2019, 12:40
Forum: Ask for Help (v1)
Topic: Pulling the first 3 characters from each line in a file
Replies: 8
Views: 1782

Re: Pulling the first 3 characters from each line in a file

Most of it doesn't require comments, it just requires one to read our delightfully friendly manual. FileRead FileAppend RegExReplace MsgBox Run The components of the "needle" regular expression within RegExReplace can be explored further from the Regular Expressions Quick Reference , but to explain ...
by sinkfaze
26 Mar 2019, 14:37
Forum: Ask for Help (v1)
Topic: InStr always returning TRUE!!!!!
Replies: 5
Views: 1326

Re: InStr always returning TRUE!!!!!

I tested your original code and with CloakerSmoker's suggested fix, yours fails as expected and his works as expected. You need to look back over your code and make sure you've reloaded the script with the fix.
by sinkfaze
26 Mar 2019, 13:41
Forum: Ask for Help (v1)
Topic: Pulling the first 3 characters from each line in a file
Replies: 8
Views: 1782

Re: Pulling the first 3 characters from each line in a file

Code: Select all

FileRead, TextFileA, TextFileA.txt
FileRead, TextFileB, TextFileB.txt
FileAppend, % TextFileB . "`r`n" . RegExReplace(TextFileA,"`am)^.{3}\K.+"), TextFileC.txt
MsgBox, Finished!
Run, TextFileC.txt
RegEx was tested on a var from a 100K line file.
by sinkfaze
26 Mar 2019, 12:21
Forum: Ask for Help (v1)
Topic: trying to prevent a function from running more than once at a time
Replies: 22
Views: 7279

Re: trying to prevent a function from running more than once at a time

Code: Select all

#SingleInstance, Force

f1::
if	!sending
{
	sending :=	1
	Loop, 5
		Send 0123456789{ENTER}
	sending :=	0
}
return
:?:
by sinkfaze
25 Mar 2019, 16:15
Forum: Ask for Help (v1)
Topic: Remove duplicates from HUGE listing Topic is solved
Replies: 13
Views: 3248

Re: Remove duplicates from HUGE listing Topic is solved

A slight variation:

Code: Select all

i :=	0
 , v :=	"`r`n"
 , o :=	{}
FileRead, in, text.txt
arr :=	StrSplit(Trim(RegExReplace(in,"\v+","`n"),"`n"),"`n")
For i, t in arr
	if	Mod(i,2) && !o[t]
		o[t] :=	1, out .=	t v arr[i+1] v v 
FileDelete, nodupes.txt
FileAppend, %	Trim(out,v), nodupes.txt
return
by sinkfaze
22 Mar 2019, 13:14
Forum: Ask for Help (v1)
Topic: How to make script work on MULTIPLE Cells in Excel?
Replies: 12
Views: 2622

Re: How to make script work on MULTIPLE Cells in Excel?

Code: Select all

For cell, Value in Xl.Selection
No need for the value parameter, it is superfluous in this case.

Code: Select all

For cell in Xl.Selection
by sinkfaze
22 Mar 2019, 11:20
Forum: Ask for Help (v1)
Topic: ExitApp not working as expected Topic is solved
Replies: 6
Views: 2988

Re: ExitApp not working as expected Topic is solved

Run, notepad.exe x:: MsgBox, Ex return ExitApp Return If there is no caller to which to return, Return will do an Exit instead. Exit Exits the current thread or (if the script is not persistent and contains no hotkeys) the entire script. IOW, if you place a Return before ExitApp , ExitApp will neve...
by sinkfaze
22 Mar 2019, 10:48
Forum: Forum Issues
Topic: Reminding new members to use code tags
Replies: 71
Views: 23240

Re: Reminding new members to use code tags

It's nonsensical for admins/mods to be annoyed or surprised that users don't use code tags. We're neither annoyed nor surprised. Many users won't even know that the concept of code tags exists. On a scripting site?! You say you've been trying things for years!? Right now I see no evidence of anythi...
by sinkfaze
22 Mar 2019, 09:26
Forum: Gaming Help (v1)
Topic: WOW Spam key script
Replies: 9
Views: 5449

Re: WOW Spam key script

bpg66fhdi1 wrote:
21 Mar 2019, 13:13
It seems to me that this still did not solve my problem ... maybe after doing something wrong, you could show how this example script should look like?
Could you post the code that you tried so we might see what's going wrong?
by sinkfaze
21 Mar 2019, 14:38
Forum: Ask for Help (v1)
Topic: Outlook COM: MailItem.Restict(Filter) HELP Topic is solved
Replies: 2
Views: 732

Re: Outlook COM: MailItem.Restict(Filter) HELP Topic is solved

Filter := "[Unread] = True" ; <~~~ no literal quotes outlook := ComObjActive("Outlook.Application") , outlooknamespace := outlook.GetNameSpace("MAPI") , inboxfolder := outlooknamespace.GetDefaultFolder(6) , currentmessage := inboxfolder.Items.Restrict(Filter).GetLast() , clipboard := currentmessage...
by sinkfaze
18 Mar 2019, 14:28
Forum: Ask for Help (v1)
Topic: Why can't I pass my Array Index values to function??
Replies: 1
Views: 379

Re: Why can't I pass my Array Index values to function??

There is a lot to untangle here. First, if you have variables with static values you should remove them from the loop so they don't reset each time: URL := StrSplit(URL, "`n") , AmountOfURLs := URL.MaxIndex() , selectors := "h1, h2, h3, h4, h5, h6" ; <~~~ , attribute := "innerText" ; <~~~ Loop, % Am...
by sinkfaze
18 Mar 2019, 10:37
Forum: Ask for Help (v1)
Topic: Add space after a subdomain in an url. How? Topic is solved
Replies: 15
Views: 3572

Re: Add space after a subdomain in an url. How? Topic is solved

Hello. Let's say I have thesel urls: https://www.test.com/ http://test.co.uk/jpg.png https://pbs.test.gr/xxx/xxx.jpg How do I add a space between the subdomain ( test in this case) and the . that follows it, so that they look like this: https://www.test .com/ http://test .co.uk/jpg.png https://pbs....
by sinkfaze
18 Mar 2019, 08:41
Forum: Ask for Help (v1)
Topic: Add space after a subdomain in an url. How? Topic is solved
Replies: 15
Views: 3572

Re: Add space after a subdomain in an url. How? Topic is solved

@IMEime

You're about to take another vacation from these forums. Cool it.
by sinkfaze
15 Mar 2019, 11:56
Forum: Gaming Help (v1)
Topic: WOW Spam key script
Replies: 9
Views: 5449

Re: WOW Spam key script

It's OK, I have moved the thread to the Gaming forum.
by sinkfaze
15 Mar 2019, 10:44
Forum: Ask for Help (v1)
Topic: How to compare time strings? Topic is solved
Replies: 5
Views: 2373

Re: How to compare time strings? Topic is solved

Since those variables can output numbers with leading zeroes, and the OP is looking for hour "00" anyway, I want to be sure that the comparison sees them as numbers and not strings. Maybe not necessary, but it's assurance for me.
by sinkfaze
15 Mar 2019, 10:41
Forum: Ask for Help (v1)
Topic: combobox and variable change
Replies: 5
Views: 678

Re: combobox and variable change

Where is your gLabel to make that code work? You have to submit the GUI.

Go to advanced search