Googler24022 Posted June 12, 2005 Share Posted June 12, 2005 (edited) I have a script and i was wandering if there is any easy way to make the code work on a Mac Osx Enviroment? Edited January 29, 2012 by Googler24022 Link to comment Share on other sites More sharing options...
FuryCell Posted June 12, 2005 Share Posted June 12, 2005 I have a script and i was wandering if there is any easy way to make the code work on a Mac Osx Enviroment?<{POST_SNAPBACK}>The only way i could think of is to use a windows emulator or rewrite it in a mac freindly laungauge. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Googler24022 Posted June 12, 2005 Author Share Posted June 12, 2005 (edited) Is this hard to do? Because i have no idea Edited January 29, 2012 by Googler24022 Link to comment Share on other sites More sharing options...
/dev/null Posted June 12, 2005 Share Posted June 12, 2005 (edited) Is this hard to do? Because i have no idea.<{POST_SNAPBACK}>Emulator? No, take a look at qemu. But an emulator is probably not what you want, as your script will run in an isolated Windows Environment.Porting the script? Well, it depends on the complexity of your script and if it is "portable". If it uses a lot of windows-specific stuff (RegRead, GUIxxx, etc.) then it will be rather hard to do. Otherwise it might be not so hard to port it to perl, python or ruby. EDIT: and of course AppleScript.What's your script doing?CheersKurt Edited June 12, 2005 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Googler24022 Posted June 13, 2005 Author Share Posted June 13, 2005 (edited) Heres the scriptProgressOn("Progress Meter", "Loading", "0 percent")For $i = 10 to 100 step 1 sleep(100) ProgressSet( $i, $i & " percent")NextProgressSet(100 , "Done", "Complete")sleep(500)ProgressOff()Dim $handleArray[10]opt("MouseCoordMode", 2)Global $PausedHotKeySet("{ESC}", "TogglePause")For $i = 1 To 10 $url = "http://www.darkthrone.com/recruiter/index.dt?session=" $ObjIE = ObjCreate ("InternetExplorer.Application") With $ObjIE .Visible = True .Navigate ($url) .FullScreen = False Do Sleep(50) Until .ReadyState = 3 EndWith $handleArray[$i - 1] = WinGetHandle(WinGetTitle(""))NextFor $i = 1 To 35 For $y = 1 To 10 WinActivate($handleArray[$y - 1]) While _IsPressed('01') = 0 Sleep(100) WEnd Sleep(150) NextNextFor $i = 1 To 9 WinClose($handleArray[$i - 1])NextFunc TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("")EndFunc ;==>TogglePauseFunc _IsPressed($hexKey) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRvEndFunc ;==>_IsPressed Edited January 29, 2012 by Googler24022 Link to comment Share on other sites More sharing options...
FuryCell Posted June 17, 2005 Share Posted June 17, 2005 (edited) Heres the scriptProgressOn("Progress Meter", "Loading", "0 percent")For $i = 10 to 100 step 1 sleep(100) ProgressSet( $i, $i & " percent")NextProgressSet(100 , "Done", "Complete")sleep(500)ProgressOff()Dim $handleArray[10]opt("MouseCoordMode", 2)Global $PausedHotKeySet("{ESC}", "TogglePause")For $i = 1 To 10 $url = "http://www.darkthrone.com/recruiter/index.dt?session=" $ObjIE = ObjCreate ("InternetExplorer.Application") With $ObjIE .Visible = True .Navigate ($url) .FullScreen = False Do Sleep(50) Until .ReadyState = 3 EndWith $handleArray[$i - 1] = WinGetHandle(WinGetTitle(""))NextFor $i = 1 To 35 For $y = 1 To 10 WinActivate($handleArray[$y - 1]) While _IsPressed('01') = 0 Sleep(100) WEnd Sleep(150) NextNextFor $i = 1 To 9 WinClose($handleArray[$i - 1])NextFunc TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("")EndFunc ;==>TogglePauseFunc _IsPressed($hexKey) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRvEndFunc ;==>_IsPressed<{POST_SNAPBACK}>The objects might be hard becuase AFAIK this is a windows only function. (there might be somthing similar on the mac though i don't know.)Also i don't think Internet Explorer runs on the mac. Edited June 17, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
jamesband Posted June 18, 2005 Share Posted June 18, 2005 The objects might be hard becuase AFAIK this is a windows only function. (there might be somthing similar on the mac though i don't know.)Also i don't think Internet Explorer runs on the mac. <{POST_SNAPBACK}>I believe that IE is fully scriptable with Applescript on OS 9+ and AFAIK on OS X as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now