Last active
August 29, 2015 14:04
-
-
Save cKlee/c85968c306f3373a0116 to your computer and use it in GitHub Desktop.
WinIBW helpers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* zählt Exemplardatensätze | |
* | |
* @return int|null | |
*/ | |
function __exemplareAnzahl() | |
{ | |
var strTitle = application.activeWindow.copyTitle(); | |
var regexpExe = /\n(70[0-9][0-9])/g; | |
var alleExe = new Array(); | |
alleExe = strTitle.match(regexpExe); | |
//application.messageBox("", alleExe.length, "message-icon"); | |
return (!alleExe) ? null : alleExe.length; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* iteriert durch Exemplare und ruft für jedes Exemplar eine Funktion auf | |
*/ | |
function __iterateExemplare(callback) | |
{ | |
var exCount = __exemplareAnzahl(); | |
for(var i = 1; i <= exCount; i++) | |
{ | |
callback(i); | |
} | |
} | |
/** | |
* test function for __iterateExemplare | |
*/ | |
function testIterate() | |
{ | |
__iterateExemplare( | |
function(i) | |
{ | |
application.messageBox("", "Exemplar Nr. "+i, "message-icon"); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment