Search found 398 matches

by SifJar
21 Feb 2017, 14:08
Forum: Ask For Help
Topic: Calling an SDK from AHK
Replies: 13
Views: 3097

Re: Calling an SDK from AHK

What sort of SDK is it? Is there a DLL file distributed?

It might be helpful if you can share a link to the SDK and/or it's documentation.
by SifJar
21 Feb 2017, 14:06
Forum: Ask For Help
Topic: Parsing HTML
Replies: 8
Views: 2856

Re: Parsing HTML

htmlfile is the proper COM thing for working with html files, not the xml parser. https://autohotkey.com/boards/viewtopic.php?p=398#p398 I am not sure on its limitations also, you don't need a file for it, you could save it to a variable as shown above. Unless ofcourse you want/need that file downl...
by SifJar
20 Feb 2017, 17:55
Forum: Ask For Help
Topic: Parsing HTML
Replies: 8
Views: 2856

Re: Parsing HTML

htmlfile is the proper COM thing for working with html files, not the xml parser. https://autohotkey.com/boards/viewtopic.php?p=398#p398 I am not sure on its limitations also, you don't need a file for it, you could save it to a variable as shown above. Unless ofcourse you want/need that file downl...
by SifJar
20 Feb 2017, 17:13
Forum: Ask For Help
Topic: Parsing HTML
Replies: 8
Views: 2856

Re: Parsing HTML

The code below gets the content of the website, stores it into the variable HtmlText and displays it with your default browser: ; Example: Download text to a variable: whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") whr.Open("GET", "https://eternallybored.org/misc/wget/", true) whr.Send() ; Using...
by SifJar
20 Feb 2017, 14:29
Forum: Ask For Help
Topic: Parsing HTML
Replies: 8
Views: 2856

Parsing HTML

I'm writing a script and it would be handy to parse an HTML file pulled from the web. I was able to follow the example on the UrlDownloadToFile page to download the HTML page into a variable easily enough, but I'm having some trouble parsing the file and extracting the section I want. I'm trying to ...
by SifJar
22 May 2016, 07:40
Forum: Ask For Help
Topic: Compiling images into exe?
Replies: 4
Views: 1070

Re: Compiling images into exe?

Code: Select all

FileInstall, G:\KVC\New folder\Captures\capture(1).png, capture(1).png ; put in auto-execute section at top of script

; change the imagesearch commands like this:
ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, *95 capture(1).png
Obviously do the same thing for each image
by SifJar
12 May 2016, 18:51
Forum: Ask For Help
Topic: AHK for Linux?
Replies: 2
Views: 2035

Re: AHK for Linux?

Are you moving to Linux or Mac? Cause those are two completely different operating systems. Regardless, there was a partial port of AHK called IronAHK which was cross-platform (so would work on both Linux and Mac). It was abandoned long before it came anywhere close to completion, but if you look yo...
by SifJar
10 May 2016, 07:12
Forum: Ask For Help
Topic: Loop
Replies: 1
Views: 456

Re: Loop

No loop required for that:

Code: Select all

Send, Hi{right 15}{enter}
by SifJar
09 May 2016, 10:37
Forum: Ask For Help
Topic: File Name from Font Name?
Replies: 13
Views: 2741

Re: File Name from Font Name?

Ah, I suspected it might be to do with 32/64 bit, but I wasn't sure how! Thanks just me for clearing that up!
by SifJar
09 May 2016, 10:32
Forum: Ask For Help
Topic: preventing .bak
Replies: 5
Views: 834

Re: preventing .bak

Options > Open User Properties, then paste this to the end of the file that opens and save: make.backup=0
by SifJar
07 May 2016, 09:44
Forum: Ask For Help
Topic: How to use DOM to retrieve an XML element other than the first occurrence
Replies: 6
Views: 1173

Re: How to use DOM to retrieve an XML element other than the first occurrence

(2) https://msdn.microsoft.com/en-us/library/ms754523(v=vs.85).aspx returns a list, documented here: https://msdn.microsoft.com/en-us/library/ms767664(v=vs.85).aspx subbing this into your above code in place of selectSingleNode, XMLnode would be this list. You can get the number of matched elements ...
by SifJar
06 May 2016, 05:31
Forum: Ask For Help
Topic: File Name from Font Name?
Replies: 13
Views: 2741

Re: File Name from Font Name?

Huh, no idea why that would be, it works perfectly here! You changed the path to the font file, right? (I know that seems obvious, but I can't think of many other reasons for it not to work). Here's a "debugging" version to try, if you could run it with a ttf and an otf file, and then send me the lo...
by SifJar
05 May 2016, 15:10
Forum: Ask For Help
Topic: Read txt and extract data to variable
Replies: 6
Views: 991

Re: Read txt and extract data to variable

Don't modify the function, change the call e.g.

Code: Select all

MsgBox, % FindMatch(A_Username)
The % signs aren't used here because the parameters of a function use expression syntax, which means that variables are referenced without %
by SifJar
04 May 2016, 18:49
Forum: Ask For Help
Topic: File Name from Font Name?
Replies: 13
Views: 2741

Re: File Name from Font Name?

It's not straight forward, and I've only really tested it on a couple of font families, but this seems to work for me: font := FileOpen("C:\Users\Jonny\Downloads\blasad\AdobeArabic-Regular.otf", "r") if !font ; basic error catching MsgBox % "Error " A_LastError while font.ReadUInt() != 0x656D616E ; ...
by SifJar
04 May 2016, 08:25
Forum: Ask For Help
Topic: File Name from Font Name?
Replies: 13
Views: 2741

Re: File Name from Font Name?

Simplest way is likely going to involve a registry loop and the registry key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts where there is a list of all installed fonts (provided they are installed in a regular manner), with the entry name being the name of the font and the value being the ...
by SifJar
27 Apr 2016, 18:51
Forum: Ask For Help
Topic: AHK File Backup Script Creating Backups Too Often, Why?
Replies: 6
Views: 1268

Re: AHK File Backup Script Creating Backups Too Often, Why?

DaysSinceLastRun += %LastRun% +24, hours would indeed be following the instructions fine (if what you want that line to do is add the last run time (taking the variable as a number of hours, which it isn't from your code) + 24 hours to the value stored in DaysSinceLastRun). However, that is not wha...
by SifJar
26 Apr 2016, 08:28
Forum: Ask For Help
Topic: AHK File Backup Script Creating Backups Too Often, Why?
Replies: 6
Views: 1268

Re: AHK File Backup Script Creating Backups Too Often, Why?

You were not advised to format it as you had it there.

Anyway, glad you got it working somehow.
by SifJar
25 Apr 2016, 18:36
Forum: Ask For Help
Topic: AHK File Backup Script Creating Backups Too Often, Why?
Replies: 6
Views: 1268

Re: AHK File Backup Script Creating Backups Too Often, Why?

This line seems wrong: DaysSinceLastRun += %LastRun%, +24, hours ; += only takes two parameters, a value and a unit. You have given it three. In this case, it will add whatever value is stored in LastRun as a simple integer addition. I suspect you may have meant DaysSinceLastRun += %LastRun% +24, ho...
by SifJar
23 Apr 2016, 18:14
Forum: Ask For Help
Topic: [Will pay 5$] Send keystroke to inactive (background) window (SMPlayer)
Replies: 19
Views: 2905

Re: [Will pay 5$] Send keystroke to inactive (background) window (SMPlayer)

Yup space was working, which was the default option. Although I didn't run the script as admin, which now I think of it may have worked (I installed SMPlayer specifically for this and uninstalled it after, not installing it again to test). I couldn't seem to find any window messages being received b...
by SifJar
22 Apr 2016, 11:56
Forum: Ask For Help
Topic: Is there a better way of doing this ?
Replies: 3
Views: 626

Re: Is there a better way of doing this ?

You could also use ControlSend e.g.

Code: Select all

ButtonF2:
; curly brackets not required for label
ControlSend,,{F2},  - SRT International BV, , 3
return

Go to advanced search