Search found 518 matches

by sinkfaze
28 Mar 2019, 08:25
Forum: Ask For Help
Topic: What am I doing wrong here ? Variable is empty
Replies: 14
Views: 1060

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
Topic: Pulling the first 3 characters from each line in a file
Replies: 8
Views: 847

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
Topic: InStr always returning TRUE!!!!!
Replies: 5
Views: 610

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
Topic: Pulling the first 3 characters from each line in a file
Replies: 8
Views: 847

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
Topic: trying to prevent a function from running more than once at a time
Replies: 22
Views: 2303

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
Topic: Remove duplicates from HUGE listing Topic is solved
Replies: 10
Views: 1313

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
Topic: How to make script work on MULTIPLE Cells in Excel?
Replies: 12
Views: 1277

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
Topic: ExitApp not working as expected Topic is solved
Replies: 6
Views: 793

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: 11743

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
Topic: WOW Spam key script
Replies: 9
Views: 1901

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
Topic: Outlook COM: MailItem.Restict(Filter) HELP Topic is solved
Replies: 2
Views: 280

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
Topic: Why can't I pass my Array Index values to function??
Replies: 1
Views: 230

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
Topic: Add space after a subdomain in an url. How? Topic is solved
Replies: 15
Views: 1470

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
Topic: Add space after a subdomain in an url. How? Topic is solved
Replies: 15
Views: 1470

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
Topic: WOW Spam key script
Replies: 9
Views: 1901

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
Topic: How to compare time strings? Topic is solved
Replies: 5
Views: 583

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
Topic: combobox and variable change
Replies: 5
Views: 390

Re: combobox and variable change

Where is your gLabel to make that code work? You have to submit the GUI.
by sinkfaze
15 Mar 2019, 10:24
Forum: Ask For Help
Topic: Please make me understand why the behavior of these two arrays is different as shown in these two examples?
Replies: 13
Views: 1343

Re: Please make me understand why the behavior of these two arrays is different as shown in these two examples?

IMEime has given the specifics, I refrained from doing so because, in this case, it's a lot like going to the doctor and complaining that it hurts when you stab yourself with a knife. It doesn't really matter why it hurts at that point, stop stabbing yourself.
by sinkfaze
15 Mar 2019, 10:18
Forum: Forum Issues
Topic: Reminding new members to use code tags
Replies: 71
Views: 11743

Re: Reminding new members to use code tags

Sigh this is a 15 year long battle and nothing has actually worked. I gave up like 5 years ago :+1: I might argue that the process of adding code tags is much less obvious in newer editor layout, but new users barely used them when it was really obvious. We're not saying nothing could be done progr...

Go to advanced search