Search found 51 matches

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

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 (v1)
Topic: Issues with a function doing Title Case
Replies: 3
Views: 1176

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 (v1)
Topic: Issues with a function doing Title Case
Replies: 3
Views: 1176

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))" Clipboard :...
by menteith
20 Jul 2016, 04:41
Forum: Ask for Help (v1)
Topic: No decode delegate error in AHK while using ImageMagick
Replies: 0
Views: 813

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 (v1)
Topic: [FUNCTION] StdoutToVar with exit code
Replies: 30
Views: 20160

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 (v1)
Topic: [FUNCTION] StdoutToVar with exit code
Replies: 30
Views: 20160

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 Return ; ----------...
by menteith
28 Jun 2016, 07:36
Forum: Ask for Help (v1)
Topic: Script to move the last word of a string to the beginning Topic is solved
Replies: 7
Views: 2575

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 person at once). Ho...
by menteith
28 Jun 2016, 05:01
Forum: Ask for Help (v1)
Topic: Script to move the last word of a string to the beginning Topic is solved
Replies: 7
Views: 2575

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

[quote="kon"]Here's a first attempt. It seems to be working for the examples provided. [/quote] 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...
by menteith
27 Jun 2016, 08:24
Forum: Ask for Help (v1)
Topic: Script to move the last word of a string to the beginning Topic is solved
Replies: 7
Views: 2575

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 (v1)
Topic: Even more true title case Topic is solved
Replies: 11
Views: 3107

Re: [SOLVED] Even more true title case Topic is solved

Yes, it is working fine now.
by menteith
18 Jun 2016, 04:18
Forum: Ask for Help (v1)
Topic: Even more true title case Topic is solved
Replies: 11
Views: 3107

Re: [SOLVED] Even more true title case Topic is solved

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?|s|t)?|B(?:ut|y)|For|In|Nor|O(?:f|...
by menteith
17 Jun 2016, 08:59
Forum: Ask for Help (v1)
Topic: Even more true title case Topic is solved
Replies: 11
Views: 3107

Re: Even more true title case Topic is solved

Capn Odin wrote:Like this ?[
Perfect, thank you!
by menteith
16 Jun 2016, 08:01
Forum: Ask for Help (v1)
Topic: Even more true title case Topic is solved
Replies: 11
Views: 3107

Re: Even more true title case Topic is solved

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", "for", "if", "in", "of", "on", "or", "the", "to", "with", "over"] str :...
by menteith
15 Jun 2016, 12:30
Forum: Ask for Help (v1)
Topic: Even more true title case Topic is solved
Replies: 11
Views: 3107

Even more true title case Topic is solved

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 (v1)
Topic: [SOLVED] Function to transpose names gives errors
Replies: 3
Views: 1825

Re: Function to transpose names gives errors

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

[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" str...
by menteith
03 Jun 2016, 03:13
Forum: Ask for Help (v1)
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 3448

Re: Help with IE COM – loop for correct tag

ameyrick wrote:no_whitespace()

Code: Select all

OnExit("KillIE")

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

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" || IE.busy Sleep 10 script_cla...
by menteith
01 Jun 2016, 11:33
Forum: Ask for Help (v1)
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 3448

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 index, val in str{ if...
by menteith
01 Jun 2016, 11:08
Forum: Ask for Help (v1)
Topic: Help with IE COM – loop for correct tag
Replies: 11
Views: 3448

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