Rosetta Code/Count examples: Difference between revisions
Content added Content deleted
(+AutoHotkey) |
m (→{{header|AutoHotkey}}: Minor indentation and casing edit) |
||
Line 11: | Line 11: | ||
Total: X examples.</lang> |
Total: X examples.</lang> |
||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |
||
<lang AutoHotkey> |
<lang AutoHotkey>UrlDownloadToFile |
||
, http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml |
, http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml |
||
, tasks.xml |
, tasks.xml |
||
FileRead, tasks, tasks.xml |
|||
pos = 0 |
pos = 0 |
||
quote = " ; " |
quote = " ; " |
||
regtitle := "<cm.*?title=" . quote . "(.*?)" . quote |
regtitle := "<cm.*?title=" . quote . "(.*?)" . quote |
||
While, pos := RegExMatch(tasks, regtitle, title, pos + 1) |
|||
{ |
{ |
||
UrlDownloadToFile |
|||
urldownloadtofile |
|||
, % "http://www.rosettacode.org/w/index.php?title=" . title1 . "&action=raw" |
, % "http://www.rosettacode.org/w/index.php?title=" . title1 . "&action=raw" |
||
, task.xml |
, task.xml |
||
FileRead, task, task.xml |
|||
RegExReplace(task, "\{\{header\|", "", count) |
|||
current := title1 . ": " . count . " examples.`n" |
current := title1 . ": " . count . " examples.`n" |
||
output .= current |
output .= current |
||
TrayTip, current, % current |
TrayTip, current, % current |
||
} |
} |
||
MsgBox % output |
|||
Return</lang> |
|||
=={{header|C sharp|C#}}== |
=={{header|C sharp|C#}}== |
||