Search found 638 matches

by FanaticGuru
19 Jul 2017, 13:24
Forum: Ask For Help
Topic: Indent left-aligned text in GUI button
Replies: 18
Views: 159

Re: Indent left-aligned text in GUI button

But only Numpad4 was acceptable as the others all gave the same error: Numpad5 Line Text: Let's see how this looks: % 2 + 3 Error: This parameter contains a variable name missing its ending percent sign. Numpad6 Line Text: Let's see how this looks: % 2 "+" 3 Error: This parameter contains...
by FanaticGuru
18 Jul 2017, 19:39
Forum: Ask For Help
Topic: Indent left-aligned text in GUI button
Replies: 18
Views: 159

Re: Indent left-aligned text in GUI button

x = 2 + 2 ; this literally assigns 2 + 2 to x with no evaluation like a string y := 2 + 2 ; this gets evaluated as an expression and assigns 4 to y MsgBox x y ; literally shows what is after the command with no evaluation which is x y MsgBox % x " = " y ; the % forces what comes after it ...
by FanaticGuru
07 Jul 2017, 20:06
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 51
Views: 892

Re: Split excel file in many small ones

The more I look at it the smaller the code gets. FileSelectFile, File_Source, 1, % A_Desktop "\Test", Selecte Source File, *.xls? SplitPath, File_Source,, Folder_Dest xlApp := ComObjCreate("Excel.Application") xlSheet := xlApp.Workbooks.Open(File_Source).Sheets(1) Last := xlSheet...
by FanaticGuru
07 Jul 2017, 18:06
Forum: Ask For Help
Topic: Excel VBA: UCase and LCase
Replies: 13
Views: 237

Re: Excel VBA: UCase and LCase

Thanks, control flow statements are trickier. I don't really need a perfect converter, although I might automate some of it. My main concern was re. constants (I have a list now), which functions can't be used via oXl.Application (I have a good list in a link above), if they can be used directly vi...
by FanaticGuru
07 Jul 2017, 17:27
Forum: Ask For Help
Topic: Excel VBA: UCase and LCase
Replies: 13
Views: 237

Re: Excel VBA: UCase and LCase

A lot of the functions in macros look equivalent, but it turns out that some can and some can't be accessed via oXl.Application. When dealing with VBA then MSDN is your friend. It tells you every event, method, and property that can be used with everything. https://msdn.microsoft.com/en-us/vba/exce...
by FanaticGuru
07 Jul 2017, 17:21
Forum: Ask For Help
Topic: Excel VBA: UCase and LCase
Replies: 13
Views: 237

Re: Excel VBA: UCase and LCase

Now there might be some convoluted way to access this scripting language directly [EDIT:] Regarding difficulty/impossibility, these things are all relative. This is not the most useful script, however, it demonstrates a workaround that allows AutoHotkey to make use of the UCase function indirectly:...
by FanaticGuru
07 Jul 2017, 16:50
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 51
Views: 892

Re: Split excel file in many small ones

WalkerOfTheDay wrote:
kon wrote:Are there commas in the main workbook file? Or do the commas only appear in the new workbooks?

Yes, there are commas in the main workbook.

So is it always two decimals like money? 567,98
Do they have periods for thousand separators? 1.567,98
Are they all in one column?

FG
by FanaticGuru
07 Jul 2017, 16:44
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 51
Views: 892

Re: Split excel file in many small ones

Okay, So I tested both scripts and in terms of speed kon's script kicks FantasticGuru's ass :) 01:08 against 03:44 on a 21818 line excel file. Nice. The main difference in our two scripts is that kon collects the rows of a file all in one range and then copies the multi-row range at once whereas I ...
by FanaticGuru
07 Jul 2017, 16:03
Forum: Ask For Help
Topic: Excel VBA: UCase and LCase
Replies: 13
Views: 237

Re: Excel VBA: UCase and LCase

You can use the UCase and LCase functions in Excel macros (e.g. Excel 2007), I provided an example above. There are some other potentially more useful functions that come under this 'Strings' category. If I could somehow get AutoHotkey via COM to execute these functions, that would be useful, other...
by FanaticGuru
07 Jul 2017, 15:19
Forum: Ask For Help
Topic: Excel VBA: UCase and LCase
Replies: 13
Views: 237

Re: Excel VBA: UCase and LCase

How can this be recreated in AutoHotkey via COM: 'Excel VBA code: vText = UCase("HeLLo") & " " & LCase("HeLLo") vText = Strings.UCase("HeLLo") & " " & Strings.LCase("HeLLo") E.g. the following doesn't work: oXl := Excel_Get...
by FanaticGuru
07 Jul 2017, 12:44
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 51
Views: 892

Re: Split excel file in many small ones

Thanks FG ! I will test it later today. One remark though: (I didn't tell you this so you couldn't know) Not every section will contain the word "Aktiven" so I think your solution would fail at this point right ? It is actually simpler if a blank line is assumed to be the divider and star...
by FanaticGuru
07 Jul 2017, 03:46
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 51
Views: 892

Re: Split excel file in many small ones

Done pretty quickly and tested hardly any but appears to do what you want and should be pretty quick. File_Source := A_Desktop "\Test\Aktiven.xlsx" Folder_Dest := A_Desktop "\Test\" xlApp := ComObjCreate("Excel.Application") xlApp.Visible := false xlApp.DisplayAlerts :=...
by FanaticGuru
06 Jul 2017, 18:35
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 51
Views: 892

Re: Split excel file in many small ones

I have enough expertise to do this and I love Microsoft and Bill Gates for that matter. Without them I would not be able to use AHK!

It is Apple that I hate... well except for my iPhone... well actually I am starting to hate it too. But I really like my iPad!

Give me a little bit.

FG
by FanaticGuru
06 Jul 2017, 18:15
Forum: Ask For Help
Topic: Outlook COM - searching a specific folder?
Replies: 3
Views: 58

Re: Outlook COM - searching a specific folder?

You just need to work down the folder tree till you get the folder you want. F11:: olApp := ComObjCreate("Outlook.Application") olNameSpace := olApp.GetNamespace("MAPI") olFolder := olNameSpace.Folders("Fanatic Guru").Folders("Inbox").Folders("urgent"...
by FanaticGuru
05 Jul 2017, 19:03
Forum: Scripts and Functions
Topic: ZTrim() : Remove redundant leading/trailing zeroes from a number
Replies: 18
Views: 491

Re: ZTrim() : Remove redundant leading/trailing zeroes from a number

Not that it matters much but I just use a RegEx to get rid of trailing zeros. ; Remove Trailing Zeros N := "100.0000" MsgBox % RegExReplace(N, "\.0*$|(\.\d*?)0*$", "$1") If you want a function, I guess you could do: RemoveTrailingZeros(N) { return RegExReplace(N, "...
by FanaticGuru
05 Jul 2017, 17:49
Forum: Ask For Help
Topic: Find all cells containing same values
Replies: 7
Views: 122

Re: Find all cells containing same values

How do you get it to work with another sheet or another workbook? I tried changing "rng := xl.ActiveSheet.UsedRange.Cells" to Sheets(3), but it does not work. I've also tried using ComObjGet(Path). You don't need to change anything in the function, just pass it the range you want it to lo...
by FanaticGuru
05 Jul 2017, 17:14
Forum: Ask For Help
Topic: Output list of all hotkeys used in ahk Topic is solved
Replies: 9
Views: 186

Re: Output list of all hotkeys used in ahk Topic is solved

if (A_ComputerName = "Computer") { FileRead, Script, %A_ScriptFullPath% } If (A_ComputerName = "Laptop") { FileRead, Script, %A_ScriptFullPath% } I don't really understand this part. Regardless of A_ComputerName the script is going to do the exact same thing. I guess if A_Comput...
by FanaticGuru
05 Jul 2017, 12:34
Forum: Ask For Help
Topic: ComObjGet problem Topic is solved
Replies: 9
Views: 170

Re: ComObjGet problem Topic is solved

Hi, I get a problem with ComObjGet . I try to connect to the Word documents content. When the document is placed in my computer, then everything works fine, but if the document is placed in the Web, then I get an error message that there is a Syntax mistake. What I'm doing wrong? doc_path := "...
by FanaticGuru
05 Jul 2017, 11:55
Forum: Ask For Help
Topic: Link something like toaster popup to specific window
Replies: 6
Views: 136

Re: Link something like toaster popup to specific window

Many thanx again but is there a way of giving background colors and font color? The same as you would for any GUI . There is a Font and Color option for GUI s. Gui,MyGUI:Color, 202020 ;background color Gui,MyGUI:Font, c5C5CF0 s17 wbold, Arial ; font color, size, weight, style There are several toas...
by FanaticGuru
03 Jul 2017, 13:47
Forum: Ask For Help
Topic: Most efficient way to do an array lookup
Replies: 13
Views: 331

Re: Most efficient way to do an array lookup

if you want to use regex, you might need to consider the case where Needle contains \E . instr has a case senstivity option if desired. Yea, wanting to search for something with \E in it would be a problem. You can go through the string and replace any \E with some obscure symbol then at the end ch...

Go to advanced search