/IronPython_Main/Runtime/Tests/LinqDlrTests/testenv/perl/eg/windows script host/specialfolder.wsf

# · Unknown · 18 lines · 16 code · 2 blank · 0 comment · 0 complexity · 92fe8e67133ff6058f98f4cc8804411a MD5 · raw file

  1. <Job Id="SpecialFolder">
  2. <script language=PerlScript>
  3. $WshShell = $WScript->CreateObject("WScript.Shell");
  4. $numFolders = $WshShell->SpecialFolders->{Count};
  5. $title = "PerlScript & WSH Example";
  6. $style = 1;
  7. for($i=0; $i<$numFolders; $i++) {
  8. $ok_or_cancel = $WshShell->Popup(
  9. $WshShell->SpecialFolders($i),
  10. undef,
  11. $title,
  12. $style);
  13. exit if ($ok_or_cancel == 2);
  14. }
  15. </script>
  16. </job>