Search found 51 matches

by menteith
27 Nov 2016, 08:59
Forum: Ask For Help
Topic: How do I retrieve data from HTML table when it has no name?
Replies: 1
Views: 165

How do I retrieve data from HTML table when it has no name?

Hi all, I'd like to retrieve data from a table in HTML without a name (the table is at the end). I like to retrieve data that come after: Year: (in this example: 1985) Number (in this example: 12) Pages: (in this example: 23-25) To do so I have come up with the following: for year document.querySele...
by menteith
01 Oct 2016, 06:28
Forum: Ask For Help
Topic: Issues with a function doing Title Case
Replies: 3
Views: 387

Re: Issues with a function doing Title Case

The following code works fine but it converts i to I. Did you mean it converts I to i? :?: ^^It doesn't work for me; probably because the regex has errors . I was sure the regex is fine but I doesn't. However, the orginal code works for me (but it should be fixed due to uncorrect regex). Please try...
by menteith
29 Sep 2016, 12:26
Forum: Ask For Help
Topic: Issues with a function doing Title Case
Replies: 3
Views: 387

Issues with a function doing Title Case

Hi all, I use the code below to make a text title-capitalized. The following code works fine but it converts i to I.How do I fix this> titleCase() { static tCase := "(?:A(?:nd?|s|t)?|B(?:ut|y)|About|Between|By|For|From|If|In|Is|Of|On|Or|The|To|With|Over|Nor|O(?:f|n|r)|Per|T(?:he|o))|I))" C...
by menteith
20 Jul 2016, 04:41
Forum: Ask For Help
Topic: No decode delegate error in AHK while using ImageMagick
Replies: 0
Views: 287

No decode delegate error in AHK while using ImageMagick

Hi all, In Windows when I run convert.exe source.tif -compress Group4 output.pdf there is no error and the output is created successfully. However, when I use AutoHotkey I get an error: Error: 0x80041771 - Source: ImageMagickObject.MagickImage.1 Description: convert: 420: no decode delegate for this...
by menteith
16 Jul 2016, 05:22
Forum: Scripts and Functions
Topic: [FUNCTION] StdoutToVar with exit code
Replies: 30
Views: 7661

Re: [FUNCTION] StdoutToVar with exit code

It did the trick, thanks. It is quite weird, however, because my initial code "cmd /k" works fine on Win 7.
by menteith
15 Jul 2016, 09:47
Forum: Scripts and Functions
Topic: [FUNCTION] StdoutToVar with exit code
Replies: 30
Views: 7661

Re: [FUNCTION] StdoutToVar with exit code

Does this function work on Windows 10? I tested it on Win 7 x64 and there is no problem but on Windows 10 32bit EN-GB the following script starts and does nothing. There is only freezed icon in the taskbar. out := StdoutToVar_CreateProcess("cmd.exe /k dir c:\","CP1") MsgBox % out...
by menteith
28 Jun 2016, 07:36
Forum: Ask For Help
Topic: Script to move the last word of a string to the beginning Topic is solved
Replies: 6
Views: 748

Re: Script to move the last word of a string to the beginning Topic is solved

Swapping the word order is as simple as: Thanks for this. What about "von, van, della" and other that should be added before surname? For example: Jane della Smith -> della Smith, Jane? And there is no need to use "`n" because my strings will be just name and a surname (only one...
by menteith
28 Jun 2016, 05:01
Forum: Ask For Help
Topic: Script to move the last word of a string to the beginning Topic is solved
Replies: 6
Views: 748

Re: Script to move the last word of a string to the beginning Topic is solved

Here's a first attempt. It seems to be working for the examples provided.[code] Thank you, it does the trick. Would it be to much if I kindly ask you to change the code to use standard AHK procedure and RegEx only if needed? I think it would be faster and I would learn from your code as well. Thank...
by menteith
27 Jun 2016, 08:24
Forum: Ask For Help
Topic: Script to move the last word of a string to the beginning Topic is solved
Replies: 6
Views: 748

Script to move the last word of a string to the beginning Topic is solved

Hi all! What I would like to achieve is to create a script that would move the last word in a string to the beginning of it. Additionally, a comma and a space should be added to the last word. Here is an example of this: John Smith John Anderson Smith John A. Smith J.A. Smith The result should be: S...
by menteith
18 Jun 2016, 05:54
Forum: Ask For Help
Topic: [SOLVED] Even more true title case
Replies: 8
Views: 981

Re: [SOLVED] Even more true title case

Yes, it is working fine now.
by menteith
18 Jun 2016, 04:18
Forum: Ask For Help
Topic: [SOLVED] Even more true title case
Replies: 8
Views: 981

Re: [SOLVED] Even more true title case

MsgBox, % titleCase("The quick brown fox jumps over the lazy dog, and that's what I've been waiting for!") MsgBox, % titleCase("Between the devil and the deep blue sea.") MsgBox, % titleCase("To be or not to be.") return titleCase(str) { static tCase := "(?:A(?:nd...
by menteith
17 Jun 2016, 08:59
Forum: Ask For Help
Topic: [SOLVED] Even more true title case
Replies: 8
Views: 981

Re: Even more true title case

Capn Odin wrote:Like this ?[


Perfect, thank you!
by menteith
16 Jun 2016, 08:01
Forum: Ask For Help
Topic: [SOLVED] Even more true title case
Replies: 8
Views: 981

Re: Even more true title case

Sorry about the regular expressions. This is unlikely to be the best approach. MsgBox, % TitleCase("The quick brown fox jumps at. over the lazy dog") TitleCase(str){ lst := ["a", "an", "and", "as", "at", "between", "but"...
by menteith
15 Jun 2016, 12:30
Forum: Ask For Help
Topic: [SOLVED] Even more true title case
Replies: 8
Views: 981

[SOLVED] Even more true title case

Hi all, There have been a few attempts, here at AHK, to solve the problem of changing the case of a sentence to true title case, i.e. especially prepositions should written using lowercase. To my best knowledge, however, no solution has dealt with prepositions that start a sentence and end it. They ...
by menteith
03 Jun 2016, 14:12
Forum: Ask For Help
Topic: [SOLVED] Function to transpose names gives errors
Replies: 3
Views: 540

Re: Function to transpose names gives errors

Thank you guys! That's it!
by menteith
03 Jun 2016, 13:26
Forum: Ask For Help
Topic: [SOLVED] Function to transpose names gives errors
Replies: 3
Views: 540

[SOLVED] Function to transpose names gives errors

Hi all, I have written a function to transpose names. Let me give you an example: 1. John Doe -> Doe, John 2. Andrew J. Nozick -> Nozick, Andrew J. This function works fine for one name. But when I have more it adds redundant spaces. string := "Russell J. Dalton, Susan E. Scarrow, Bruce E. Cain...
by menteith
03 Jun 2016, 03:13
Forum: Ask For Help
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 1442

Re: Help with IE COM – loop for correct tag

ameyrick wrote:no_whitespace()


Thank you! Much appreciated!
by menteith
02 Jun 2016, 06:47
Forum: Ask For Help
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 1442

Re: Help with IE COM – loop for correct tag

You almost had it with your first try A_Index starts at 1 not 0 IE := ComObjCreate("InternetExplorer.Application") IE.Visible := false IE.Navigate("https://www.ceeol.com/search/article-detail?id=343886") while IE.readyState != 4 || IE.document.readyState != "complete" ...
by menteith
01 Jun 2016, 11:33
Forum: Ask For Help
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 1442

Re: Help with IE COM – loop for correct tag

Thanks! I did some tests and it works:) One strange thing is that when I use: for index, val in str{ if(InStr(val, "Author(s): ")){ Authors := StrReplace(val, "<strong>Author(s): </strong>") Break } } String starts with a tab or two. The following gives the expected result: for i...
by menteith
01 Jun 2016, 11:08
Forum: Ask For Help
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 1442

Re: Help with IE COM – loop for correct tag

Capn Odin

Very nice! Thank you for your swift reply. May I have a request? I'd like to have, say, values after "Author(s): " and "Keywords: " assigned to a variable. For example: x = Andrzej Antoszewski.

Many thanks again!

Go to advanced search