HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/dptool/F39toRGBnet.au3
#include <GUIConstants.au3>
#Include <File.au3>
#Include <Array.au3>
#include <String.au3>




Global $Paused
HotKeySet("{ESC}", "Terminate")


MsgBox(4096, "Browser", "My browser is: " & _GetDefBrowserx(),1)
run("cmd.exe")
sleep(500)
send("^+1")
;send("C:\xampp\htdocs\dpReport\")
sleep(500)

send("dispread32 -v  targetrgb")
sleep(1000)
send("{enter}")
sleep(2000)


ProcessWaitClose("dispread32.exe")

sleep(2000)

send("exit")
sleep(500)
send("{enter}")
sleep(1000)

Local $result = StringInStr(_GetDefBrowser(), "firefox")
;MsgBox(0,"",$result,1)

if $result>0 then
$command = ""&_GetDefBrowserx()&" "
;$command = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe -new-tab "
;msgbox(0,"line 41",$command,1)
$url = "http://www.fredkuo.idv.tw/dptool/indexr.htm"
Run($command & $url, "", @SW_MAXIMIZE)
else 
ShellExecute("http://www.fredkuo.idv.tw/dptool/indexr.htm")    
endif






Func _GetDefBrowser()
    Local Static $s_reg = RegRead("HKCR\http\shell\open\command", "")
    Return StringRegExpReplace($s_reg, "(.*?\x22)(.*?[\\/])*(.*?)(\x22.*?\z)", "$3")
 EndFunc   ;==>_GetDefBrowser
 
     ;ProcessClose("Wscript.exe")
Func Terminate()
    ;ProcessClose("Wscript.exe")
    Exit 0
   
	;$iOrdinal=1
 EndFunc
 
 Func _GetDefBrowserx() 
	$browser = StringRegExp(RegRead("HKCR\http\shell\open\command", ""), '(?i).(\:)(.*)exe', 2) 
	return $browser[0] 
	EndFunc