Search found 1756 matches

by kon
07 Aug 2017, 09:16
Forum: Ask For Help
Topic: Using Excel COM to paste from an object into cell range?
Replies: 1
Views: 219

Re: Using Excel COM to paste from an object into cell range?

Maybe a SafeArray. Here's some examples I wrote of SafeArrays.
by kon
29 Jul 2017, 12:32
Forum: Ask For Help
Topic: SendRaw keyword does not render Multiple lines properly Topic is solved
Replies: 2
Views: 239

Re: SendRaw keyword does not render Multiple lines properly Topic is solved

Does your editor auto-indent? AHK may be sending the keystrokes as you have written, but does the editor add its own indents?
by kon
29 Jul 2017, 12:30
Forum: Ask For Help
Topic: how to assign a value to a number based on it's value
Replies: 2
Views: 242

Re: how to assign a value to a number based on it's value

Hi, try this :) #NoEnv #Warn #SingleInstance Force sim := "1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 3 4 5 6 7 8 9 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 3 4 5 6 7 8 9 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 3 4 5 6 7 8 9 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 3 4 5 6 7 8 9" ; Call the '...
by kon
26 Jul 2017, 19:15
Forum: Ask For Help
Topic: Help with json_toobj? Topic is solved
Replies: 1
Views: 258

Re: Help with json_toobj? Topic is solved

It seems to work for me. Are you doing it like this? s = {"data": {"name": "bigtony", "score": 1019, "kills": 10, "head_shots": 2, "spawn": 9, "profile_url": "", "live": 6, "online": false, "active": false, "free_weapons": 4, "top_score": 21, "currency": 0, "moto": "", "last_seen": "2017-07-09T12:01...
by kon
22 Jul 2017, 16:42
Forum: Ask For Help
Topic: Confusion with number strings Topic is solved
Replies: 3
Views: 295

Re: Confusion with number strings Topic is solved

Hey, try this:

Code: Select all

var := "1,234,000"  ; Note the non-digit characters (',')
MsgBox % var + 0

var := "1234000"
MsgBox % var + 0
HTH :)
by kon
22 Jul 2017, 13:30
Forum: Ask For Help
Topic: GUI Control inside function Topic is solved
Replies: 5
Views: 497

Re: GUI Control inside function Topic is solved

There is a problem. The Gui is not destroyed, so when you call the function a second time it will give you a warning about not being able to use the same variable for more than 1 control. You can try this. Then try it without the line that destroys the Gui. GuiShowSleepWarning() GuiShowSleepWarning(...
by kon
22 Jul 2017, 13:08
Forum: Ask For Help
Topic: GUI Control inside function Topic is solved
Replies: 5
Views: 497

Re: GUI Control inside function Topic is solved

GuiShow() ExitApp GuiShow() { static Countdown Gui, SleepWarning:Add, Text, vCountdown, 5 Gui, SleepWarning:Show, Center, SleepWarning Sleep, 1000 GuiControl, SleepWarning:, Countdown, 4 Sleep, 1000 GuiControl, SleepWarning:, Countdown, 3 Sleep, 1000 GuiControl, SleepWarning:, Countdown, 2 Sleep, 1...
by kon
21 Jul 2017, 10:29
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 61
Views: 4227

Re: Split excel file in many small ones

I would look into jeeswg's suggestion more. And also maybe, if (A_Language = "0407") ; languageCode_0407 = German_Standard https://www.autohotkey.com/docs/misc/Languages.htm NF := "m/t/jjjj" ; (Monat / Tag / Jahr) else if (A_Language = "0409") ; languageCode_0409 = English_United_States NF := "m/d/y...
by kon
20 Jul 2017, 21:39
Forum: Ask For Help
Topic: Script Created (and working) in Pulover's Macro Creator but showed 'break/continue must be enclosed' when run with AHK Topic is solved
Replies: 7
Views: 867

Re: Script Created (and working) in Pulover's Macro Creator but showed 'break/continue must be enclosed' when run with A Topic is solved

; This script was created using Pulover's Macro Creator ; www.macrocreator.com #NoEnv SetWorkingDir %A_ScriptDir% CoordMode, Mouse, Window SendMode Input #SingleInstance Force SetTitleMatchMode 2 #WinActivateForce SetControlDelay 1 SetWinDelay 0 SetKeyDelay -1 SetMouseDelay -1 SetBatchLines -1 F3::...
by kon
20 Jul 2017, 17:52
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 61
Views: 4227

Re: Split excel file in many small ones

It took me a while but I think I have a potential solution. I set up a test workbook with some dates formatted as text and the following code seems to work. (Your system has different date/time regional settings; I suspect that may complicate things. But for now give this a try.) The lines I've chan...
by kon
20 Jul 2017, 15:48
Forum: Ask For Help
Topic: objects: clearing objects
Replies: 3
Views: 408

Re: objects: clearing objects

As I understand it, AHK implements reference counting . So when you store a reference to an object (in a variable or in another object) the reference count is increased. When you clear the contents of that variable/object, this decrements the reference count. When the reference count reaches zero AH...
by kon
19 Jul 2017, 14:43
Forum: Ask For Help
Topic: Please help. use loop to access class variables
Replies: 3
Views: 494

Re: Please help. use loop to access class variables

Is there any reason that lexikos didn't make the syntax of my code working? I don't know, but I suspect some of the reasons are: - There is already a way to do this. No need to add another way to do the same thing. - It is not consistent with other languages. - (Guessing) There are probably some te...
by kon
19 Jul 2017, 12:31
Forum: Ask For Help
Topic: Please help. use loop to access class variables
Replies: 3
Views: 494

Re: Please help. use loop to access class variables

Try this: Class TestClass { __New(X1,X2,X3,X4,X5) ; <-- Changed. Needs to be '__New' not '_New' { This.X1 := X1 This.X2 := X2 This.X3 := X3 This.X4 := X4 This.X5 := X5 } Test() { Loop 5 Msgbox % This["X" . A_Index] } } Or: Class TestClass { __New(X1,X2,X3,X4,X5) { This["X", 1] := X1 This["X", 2] := ...
by kon
19 Jul 2017, 10:44
Forum: Ask For Help
Topic: Split excel file in many small ones
Replies: 61
Views: 4227

Re: Split excel file in many small ones

I tried the Excel_Get function now. I now understand how it works. Very usefull thanks so much. I changed the forum and github pages so that (hopefully) it is a bit less confusing for other people in the future. The only thing similar on these three pc's is the OS which is Vista (I know bad) and Av...
by kon
18 Jul 2017, 17:41
Forum: Ask For Help
Topic: How to copy text from a cell in a excel spreadsheet and paste into a different window
Replies: 6
Views: 3402

Re: How to copy text from a cell in a excel spreadsheet and paste into a different window

'Right-click>New>AutoHotkey Script' is only available if you install AHK (as opposed to using the portable version). The installer adds a script template to the %WINDIR%\ShellNew folder and also sets some registry keys.
by kon
18 Jul 2017, 13:18
Forum: Ask For Help
Topic: How to copy text from a cell in a excel spreadsheet and paste into a different window
Replies: 6
Views: 3402

Re: How to copy text from a cell in a excel spreadsheet and paste into a different window

Try this: ; This script gets a range of cells in column A and B. (Like selecting cell A2 and then pressing Ctrl+Shift+Down and ; then Shift+Right.) Then each time the Ctrl+F12 hotkey is pressed it sends the next value. ; Usage: ; Press Ctrl+F12 to send the next value. ; Constants xlDown := -4121 Wor...
by kon
15 Jul 2017, 10:45
Forum: Gaming
Topic: Anagrams
Replies: 133
Views: 10159

Re: Anagrams

Thank you very much for you explanation kon . I think I get it, but I do not get why it need be strlen>1 in this case, it would suffice it is not a letter, right? Yes that would work provided you could guarantee that the character would not be in any word. I make a small modification to to allow pe...
by kon
14 Jul 2017, 18:20
Forum: Gaming
Topic: Anagrams
Replies: 133
Views: 10159

Re: Anagrams

Thanks for reading :) To say that array[strsplit(word)*] is a bit wasteful memory-wise is putting it mildly :) The "__" key is a bit tough to explain so maybe an example is best. Compare the two. Obj := [] Obj["a", "b"] := ["ab", "ba"] Obj["a", "b", "c"] := ["abc", "cab"] for key, val in Obj["a", "b...

Go to advanced search