Jump to content

file extention writer


7h331337
 Share

Recommended Posts

with this script you can make ur own file extention like forexample .exe .pdf and allthat you can also set an icon

CODE

#include <guiconstants.au3>

global $icon,$applacation

$main = GUICreate("file extention", 300,200)

$ext = GUICtrlCreateInput("input your file extention e.g. .exe .itmp",10,10)

$type = GUICtrlCreateInput("input your file type e.g. myscript, myprogram", 10, 40)

$app = GUICtrlCreateButton("select defalt app", 10, 70,100)

$ico = GUICtrlCreateButton("select icon", 10, 100,100)

$create = GUICtrlCreateButton("create file extention", 10, 130,100)

GUISetBkColor(0x120000,$main)

GUISetState()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $app

app()

Case $msg = $ico

icon()

Case $msg = $create

create2()

ExitLoop

EndSelect

WEnd

Func app()

$applacation = FileOpenDialog("select defalt applacation to open with", @ScriptDir, "(*.exe)")

EndFunc ;==>app

Func icon()

$icon = FileOpenDialog("select icon file", @ScriptDir, "(*.ico)")

EndFunc ;==>icon

func create2()

$ext2 = GUICtrlRead($ext)

$type2 = GUICtrlRead($type)

RegWrite("HKEY_CLASSES_ROOT\" & $ext2,"","REG_SZ",$type2)

RegWrite("HKEY_CLASSES_ROOT\" & $type2)

RegWrite("HKEY_CLASSES_ROOT\" & $type2 & "\DefaultIcon","","REG_SZ",$icon)

RegWrite("HKEY_CLASSES_ROOT\" & $type2 & "\shell","","REG_SZ","run")

RegWrite("HKEY_CLASSES_ROOT\" & $type2 & "\shell\run","","REG_SZ","run script")

RegWrite("HKEY_CLASSES_ROOT\" & $type2 & "\shell\run\command","","REG_SZ",$applacation & " %1")

endfunc

Link to comment
Share on other sites

There is already FileRegister() UDF. It's in the FAQ (Q 16.).

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

There is already FileRegister() UDF. It's in the FAQ (Q 16.).

dose that one let you create you own file type like .exe .pdf and have a icon and open it in a applacation of you choice

any way i was board lol just sumthing to pass the time

Link to comment
Share on other sites

actualy, it allowed you to use your own file extension yes, however the icon is that of the executable it is selected to run with by default.

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...