ConsultingJoe Posted June 14, 2007 Posted June 14, 2007 (edited) This will let you get, create, delete protocols.Heres a GUI & UDFsExample Of Use: Example Of GUI: expandcollapse popup#include <GUIConstants.au3> #Include <GuiListView.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AForm1", 571, 429, 193, 115) $ListView1 = GUICtrlCreateListView("Protocol|Command", 0, 1, 570, 382) _GUICtrlListViewSetColumnWidth( $ListView1, 0, 80 ) _GUICtrlListViewSetColumnWidth( $ListView1, 1, 470 ) $Button1 = GUICtrlCreateButton("Get Protocols", 235, 392, 80, 33, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ProgressOn( "Searching", "Please Wait" ) _GUICtrlListViewDeleteAllItems ( $ListView1 ) $array = _ProtocolGet() ProgressOff() For $i = 0 To UBound( $array, 1 )-1 _GUICtrlListViewInsertItem ( $ListView1, -1, $array[$i][0]&"|"&$array[$i][1] ) Next EndSwitch WEnd #cs Function: _ProtocolDelete Discription: Deletes a protocol from the registry. Params: $protocol The name of the protocol WARNING: Using this improperly can cause problems make sure you only delete a protocol you created or you know will not take effect on your computer. #ce Func _ProtocolDelete($protocol) RegDelete( "HKEY_CLASSES_ROOT\"&$protocol ) If @error Then Return @error Else Return 1 EndIf EndFunc #cs Function: _ProtocolCreate Discription: Creates a protocol and assigns a name and command to it. Params: $protocol = The protocol $name = The name of the protocol $command = The command to run note: use "%1" after the program to add the url #ce Func _ProtocolCreate($protocol, $name, $command) RegWrite("HKEY_CLASSES_ROOT\"&$protocol) RegWrite("HKEY_CLASSES_ROOT\"&$protocol, "", "REG_SZ", "URL:"&$name) RegWrite("HKEY_CLASSES_ROOT\"&$protocol, "URL Protocol", "REG_SZ", "") RegWrite("HKEY_CLASSES_ROOT\"&$protocol&"\shell\open\command") RegWrite("HKEY_CLASSES_ROOT\"&$protocol&"\shell\open\command", "", "REG_SZ", $command) EndFunc #cs Function: _ProtocolGet Discription: Gets the protocols from the registry using a two dimension array. $array[index][0] = Protocol $array[index][1] = Command Params: None #ce Func _ProtocolGet() Local $i = 0 Local $ii = 0 Dim $protocolarray[1][2] While 1 $i = $i + 1 $protocol = RegEnumKey("HKEY_CLASSES_ROOT", $i) If @error <> 0 then Return $protocolarray Else RegRead("HKEY_CLASSES_ROOT\"&$protocol, "URL Protocol") If @error = 0 Then $command = RegRead("HKEY_CLASSES_ROOT\"&$protocol&"\shell\open\command" , "") If @error = 0 Then ReDim $protocolarray [$ii+1][2] $protocolarray[$ii][0] = $protocol $protocolarray[$ii][1] = $command $ii = $ii + 1 EndIf EndIf EndIf WEnd EndFunc Edited June 15, 2007 by CyberZeroCool Check out ConsultingJoe.com
ConsultingJoe Posted June 15, 2007 Author Posted June 15, 2007 UPDATED Post #1 with images of examples of useI used this to create an AutoIt Protocol: au3://skillzthere are some protocols you don't know about such as:AIM://AOL AimSC://WinampICY://WinampITMS://ITunesMMS://Windows Media PlayerNOTE: LINKS DON'T WORK FROM THE FORUM Check out ConsultingJoe.com
James Posted June 15, 2007 Posted June 15, 2007 (edited) It displays all the protocols, but I can't access them. How do you create these etc? Edited June 15, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ConsultingJoe Posted June 15, 2007 Author Posted June 15, 2007 It displays all the protocols, but I can't access them.How do you create these etc?Use the UDFs in the script. I'm only using the get to get the protocols in the gui Check out ConsultingJoe.com
ConsultingJoe Posted January 14, 2008 Author Posted January 14, 2008 I just wanted to revisit this topic because I just forgot about it and found it. I want to share it again to see if anyone could use this. I makes for a great feature for you internet/network programs. Check out ConsultingJoe.com
WeMartiansAreFriendly Posted January 14, 2008 Posted January 14, 2008 I can find use out this. thanks. Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
BrettF Posted January 14, 2008 Posted January 14, 2008 Cool Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
ConsultingJoe Posted June 28, 2012 Author Posted June 28, 2012 Long time, no posts. I found my Topic I made 5 years ago on this and looking to see if there is a better solution for what I need.I'm trying to make a print option on a Web-based POS (point of sale) terminal computer. The POS uses Firefox mainly and the cash drawer pops open only when a receipt is printed. I need a nice integrated solution to print from the browser without the dialog?Anyone have any ideas? I figured this might work, just make an app that listens for that protocol and then takes the active window, send the print command and click print. Basically unless someone has a better idea?Thanks,CyberZeroCool Check out ConsultingJoe.com
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