Applescript to switch PHP version for XAMPP

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Applescript to switch PHP version for XAMPP

Postby jksellors » 06. August 2005 18:22

Hi, I have written an Applescript to switch PHP versions
Code: Select all
set dialogReply to display dialog " Choose which PHP version you want XAMPP to use" buttons {"PHP5", "PHP4", "Cancel"} default button 1
try
   if button returned of dialogReply is "PHP5" then
      do shell script "/Applications/xampp/xamppfiles/mampp php5" with administrator privileges -- stop xampp
   else
      if button returned of dialogReply is "PHP4" then
         do shell script " /Applications/xampp/xamppfiles/mampp php4" with administrator privileges -- restart xampp
      end if
   end if
on error errMsg number errNum from errFrom partial result errResult to errTo
   display dialog errMsg
end try
activate
display dialog " The PHP Switch is complete!" giving up after 5

Copy to your scipt editor and save to the Script Menu folder if you prefer.
jksellors
 
Posts: 7
Joined: 05. August 2005 19:05

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 5 guests