- Borders_and_other_formatting.ahk - You can ignore the last half of the script. But the first part copies an object into a SafeArray, and then the SafeArray is assigned to a Range.
- SafeArray-Split_a_string_into_cells.ahk
Search found 1756 matches
- 07 Aug 2017, 09:16
- Forum: Ask for Help (v1)
- Topic: Using Excel COM to paste from an object into cell range?
- Replies: 1
- Views: 1001
Re: Using Excel COM to paste from an object into cell range?
Maybe a SafeArray. Here's some examples I wrote of SafeArrays.
- 29 Jul 2017, 12:32
- Forum: Ask for Help (v1)
- Topic: SendRaw keyword does not render Multiple lines properly Topic is solved
- Replies: 2
- Views: 1272
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?
- 29 Jul 2017, 12:30
- Forum: Ask for Help (v1)
- Topic: how to assign a value to a number based on it's value Topic is solved
- Replies: 2
- Views: 1265
Re: how to assign a value to a number based on it's value Topic is solved
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 '...
- 26 Jul 2017, 19:15
- Forum: Ask for Help (v1)
- Topic: Help with json_toobj? Topic is solved
- Replies: 1
- Views: 1232
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...
- 22 Jul 2017, 16:42
- Forum: Ask for Help (v1)
- Topic: Confusion with number strings Topic is solved
- Replies: 3
- Views: 1636
Re: Confusion with number strings Topic is solved
Hey, try this:HTH
Code: Select all
var := "1,234,000" ; Note the non-digit characters (',')
MsgBox % var + 0
var := "1234000"
MsgBox % var + 0
- 22 Jul 2017, 13:30
- Forum: Ask for Help (v1)
- Topic: GUI Control inside function Topic is solved
- Replies: 5
- Views: 3074
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(...
- 22 Jul 2017, 13:08
- Forum: Ask for Help (v1)
- Topic: GUI Control inside function Topic is solved
- Replies: 5
- Views: 3074
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...
- 21 Jul 2017, 16:50
- Forum: Ask for Help (v1)
- Topic: Most sophisticated scripts written in AutoHotkey?
- Replies: 3
- Views: 1933
Re: Most sophisticated scripts written in AutoHotkey?
[ ImportTypeLib | Forum thread | Docs | COM Interfaces tutorial ]
A good example of meta functions and error handling IMO.
A good example of meta functions and error handling IMO.
- 21 Jul 2017, 11:02
- Forum: About This Community
- Topic: autohotkey.net
- Replies: 12
- Views: 86780
- 21 Jul 2017, 10:29
- Forum: Ask for Help (v1)
- Topic: Split excel file in many small ones
- Replies: 61
- Views: 14059
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...
- 20 Jul 2017, 21:39
- Forum: Ask for Help (v1)
- 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: 4145
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::...
- 20 Jul 2017, 17:52
- Forum: Ask for Help (v1)
- Topic: Split excel file in many small ones
- Replies: 61
- Views: 14059
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...
- 20 Jul 2017, 15:48
- Forum: Ask for Help (v1)
- Topic: objects: clearing objects
- Replies: 3
- Views: 2126
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...
- 19 Jul 2017, 14:43
- Forum: Ask for Help (v1)
- Topic: Please help. use loop to access class variables
- Replies: 3
- Views: 2151
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...
- 19 Jul 2017, 12:31
- Forum: Ask for Help (v1)
- Topic: Please help. use loop to access class variables
- Replies: 3
- Views: 2151
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] := ...
- 19 Jul 2017, 10:44
- Forum: Ask for Help (v1)
- Topic: Split excel file in many small ones
- Replies: 61
- Views: 14059
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...
- 18 Jul 2017, 17:41
- Forum: Ask for Help (v1)
- Topic: How to copy text from a cell in a excel spreadsheet and paste into a different window
- Replies: 11
- Views: 17326
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.
- 18 Jul 2017, 13:18
- Forum: Ask for Help (v1)
- Topic: How to copy text from a cell in a excel spreadsheet and paste into a different window
- Replies: 11
- Views: 17326
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...
- 15 Jul 2017, 10:45
- Forum: Gaming Scripts (v1)
- Topic: Anagrams
- Replies: 138
- Views: 43955
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...
- 14 Jul 2017, 18:20
- Forum: Gaming Scripts (v1)
- Topic: Anagrams
- Replies: 138
- Views: 43955
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...