Search found 520 matches

by sinkfaze
22 Feb 2019, 09:26
Forum: Ask for Help (v1)
Topic: need help loop reading to clipboard
Replies: 8
Views: 1756

Re: need help loop reading to clipboard

Code: Select all

Loop, %	StrLen(inputvar)
	SearchArray[A_Index] :=	SubStr(inputvar, A_Index, 1)
StrSplit() will take care of this automatically:

Code: Select all

SearchArray :=	StrSplit(inputvar)
by sinkfaze
21 Feb 2019, 13:13
Forum: Ask for Help (v1)
Topic: Accessing ComObj of an Application
Replies: 4
Views: 955

Re: Accessing ComObj of an Application

What application is this? Is the object reference online?
by sinkfaze
21 Feb 2019, 09:52
Forum: Ask for Help (v1)
Topic: How to copy Excel rows and process data
Replies: 4
Views: 1411

Re: How to copy Excel rows and process data

If you copy the range to the Clipboard, you can use two parsing loops: first one by newline, second by tab.

Code: Select all

Loop, Parse, Clipboard, `n, `r
	Loop, Parse, A_LoopField, `t
		MsgBox %	A_LoopField
by sinkfaze
15 Feb 2019, 10:59
Forum: Ask for Help (v1)
Topic: How to save safearray to excel?
Replies: 12
Views: 3272

Re: How to save safearray to excel?

DRocks, For -loops cannot parse a SafeArray in that way. SafeArray := xlCOM.Range("D" FirstRow ":N" LastRow).Value Loop % SafeArray.MaxIndex(1) { i := A_Index Loop % SafeArray.MaxIndex(2) MsgBox % SafeArray[i,A_Index] } Or: SafeArray := xlCOM.Range("D" FirstRow ":N" LastRow) ; no .Value For row in S...
by sinkfaze
15 Feb 2019, 10:24
Forum: Ask for Help (v1)
Topic: How to save safearray to excel?
Replies: 12
Views: 3272

Re: How to save safearray to excel?

ktbjx,

I'm not seeing where the SafeArrays that you're trying to modify the data for were actually created. Take HEADERArray, for example. Did you copy this data out of Excel as a SafeArray? Or did you manually create it as a SafeArray?
by sinkfaze
14 Feb 2019, 16:19
Forum: Ask for Help (v1)
Topic: Returning a String from a function Topic is solved
Replies: 6
Views: 2737

Re: Returning a String from a function Topic is solved

Code: Select all

StandardVariables(strTitle)
{
	;DETERMINE FILE NAME;
	strFile = %A_ScriptFullPath%
	SplitPath, strFile,,,, strTitle
	return	strTitle	; <~ no percent signs
}
by sinkfaze
14 Feb 2019, 10:53
Forum: Ask for Help (v1)
Topic: How to save safearray to excel?
Replies: 12
Views: 3272

Re: How to save safearray to excel?

I can modify elements within a SafeArray in exactly the manner that you demonstrate, so I think posting your code would be appropriate in this instance.
by sinkfaze
12 Feb 2019, 10:38
Forum: Ask for Help (v1)
Topic: How to save safearray to excel?
Replies: 12
Views: 3272

Re: How to save safearray to excel?

Manipulating the data within a range of cells will be much faster and easier in a SafeArray as opposed to looping through cells via COM. I thought your question pertained to how to put the data back into Excel when you are finished doing that.
by sinkfaze
12 Feb 2019, 09:34
Forum: Scripts and Functions (v1)
Topic: Num2Text function
Replies: 7
Views: 2231

Re: Num2Text function

rommmcek wrote:
11 Feb 2019, 20:38
@ sinkfaze: Your function gives me five hundred sixty-five billion - million three hundred sixty-four thousand nine hundred thirty-five for 565096364935. Is there a bug?
No, just bad copying and pasting from my tester function, it's fixed now. Sorry about that!
by sinkfaze
11 Feb 2019, 16:47
Forum: Scripts and Functions (v1)
Topic: Num2Text function
Replies: 7
Views: 2231

Num2Text function

I saw it mentioned somewhere on the forums that someone was trying to translate numbers into their text equivalents, so I decided to take a stab at the problem with my own function. It has been tested but not rigorously, and it doesn't feel like it's as efficient as it should be, so any suggestions ...
by sinkfaze
11 Feb 2019, 09:46
Forum: Ask for Help (v1)
Topic: How to save safearray to excel?
Replies: 12
Views: 3272

Re: How to save safearray to excel?

Look at your first loop, for example: cHead := 2 loop, % HEADERArray.MaxIndex() { oWorkbook.Worksheets("HEADER").Range("A1:Z"cHead).Value := HEADERArray[cHead, 1] cHead++ } Your range changes but you're only pulling a single value from the SafeArray, so no matter what it will always push that one va...
by sinkfaze
11 Feb 2019, 08:57
Forum: Ask for Help (v1)
Topic: odd or even
Replies: 3
Views: 757

Re: odd or even

Code: Select all

For i, data in arrDataFile
{
	if	!Mod(i,2)
	{
		; do things
	}
}
:?:
by sinkfaze
08 Feb 2019, 13:12
Forum: Ask for Help (v1)
Topic: When increasing the Zero at the start disappear? Topic is solved
Replies: 7
Views: 1350

Re: When increasing the Zero at the start disappear? Topic is solved

Code: Select all

#q::
IniRead, OutputVar, C:\hotkey\ipadress.ini, section1, key
Send %OutputVar%{Enter}
setformat, float, 03.0
if	not number
	number = %OutputVar%
number +=	1
IniWrite, %	SubStr("0" number,-1), C:\hotkey\ipadress.ini, section1, key
return
by sinkfaze
07 Feb 2019, 15:35
Forum: Ask for Help (v1)
Topic: Can this code be optimized? Topic is solved
Replies: 4
Views: 891

Re: Can this code be optimized? Topic is solved

Whoops, I read your code wrong the first time, sorry about that! Glad you've got it working!
by sinkfaze
07 Feb 2019, 13:51
Forum: Ask for Help (v1)
Topic: Can this code be optimized? Topic is solved
Replies: 4
Views: 891

Re: Can this code be optimized? Topic is solved

Code: Select all

Loop, 4
	if	(SubStr(A_IPAddress%A_Index%,-2) = "128")
		Ipaddress :=	A_IPAddress%A_Index%
:?:
by sinkfaze
06 Feb 2019, 12:56
Forum: Forum Issues
Topic: Yellow user names
Replies: 20
Views: 12937

Re: Yellow user names

I like it myself, pre-empted one spammer right away already this morning. Of course it won't always be that easy, but I'll take a softball every now and again.
by sinkfaze
05 Feb 2019, 16:05
Forum: Ask for Help (v1)
Topic: Office365 Excel COM problem
Replies: 9
Views: 2520

Re: Office365 Excel COM problem

IMEime,

You will receive a temporary ban if you behave in this manner again. It is wholly inappropriate.
by sinkfaze
04 Feb 2019, 16:38
Forum: Forum Issues
Topic: Requesting an Admin to handle a spam post
Replies: 19
Views: 5044

Re: Requesting an Admin to handle a spam post

Perhaps it's time to bring the user group "Spam Officer" back... It never went away . At any rate, it doesn't matter what a team member's title is, the fact is that we're all people volunteering our time to moderate the forums. If you feel that you would make a suitable Spam Officer contact one of ...
by sinkfaze
04 Feb 2019, 10:57
Forum: Ask for Help (v1)
Topic: String Replace, pleas help
Replies: 5
Views: 977

Re: String Replace, pleas help

So just to clarify, for #1 you trying to convert 'burpose' to 'purpose', and for #2 you are trying to convert 'my' to 'me'. Is that correct?
by sinkfaze
04 Feb 2019, 10:29
Forum: Ask for Help (v1)
Topic: Replacing áéíóúâôûë accented characters Topic is solved
Replies: 11
Views: 4267

Re: Replacing áéíóúâôûë accented characters Topic is solved

Lexikos' method will obviously be the fastest for decomposing correctly, as per his note of its shortcomings I modified his code to be more comprehensive. Not complete, but much better: MsgBox % StrUnmark("ÁáÀàÂâǍǎĂăÃãẢảẠạÄäÅåĀāĄąẤấẦầẪẫẨẩẬậẮắẰằẴẵẲẳẶặǺǻĆćĈĉČčĊċÇçĎďĐđÐÉéÈèÊêĚěĔĕẼẽẺẻĖėËëĒēĘęẾếỀềỄễỂểẸẹ...

Go to advanced search