Jump to content

[FIXED] Assign a file type to be opened with an AutoIt Program


Recommended Posts

Hey there!

 

Basic question :blink:

 

I need to create a registry key to assign an option to windows file context menu, so the file can be opened with an AutoIt program i made, and let the program know it was opened with a link instead of running it normally.

 

Thanks in advance :D

Link to comment
Share on other sites

1 minute ago, FrancescoDiMuro said:

What did you try by now so far? :)

We can't help you if we can't see what did you now by now :)

Yes you can help me, is not coding something, i just need to know how to use RegEdit and CmdLine with windows file context menu

 

And i haven't seen anything in helpfile.

Link to comment
Share on other sites

1 minute ago, DynamicRookie said:

Yes you can help me

I hope so, but you need to provide some work. I am giving to you everything you need to do what you are trying to do.

2 minutes ago, DynamicRookie said:

i just need to know how to use RegEdit and CmdLine with windows file context menu

 

And i haven't seen anything in helpfile.

Don't you see anything about Reg* functions in the Help file? Or Run, ShellExecute, @ComSpec ? :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

#include "FastFind.au3"
#include <File.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
$n = 'testimg.pcs'
$idata = ''
$overlim = False
$image = FileReadToArray('testimg.pcs')
For $i = 1 To UBound($image) - 1
    $idata &= $image[$i] & @CRLF
Next
$imagedata = StringSplit($idata, '|')
$idim = FileReadLine('testimg.pcs', 1)
$dims = StringSplit($idim, ' ')
$img = GUICreate('Mapping', 1, 1, -1, -1, BitOR($WS_VSCROLL, $WS_HSCROLL))
GUISetState(@SW_SHOW, $img)
$Map = WinWaitActive('Mapping')
$loop = 1
MsgBox(0, '', 'Mapping starts now')
__ImageMapping($imagedata)
Sleep(5000)

Func __ImageMapping(ByRef $data)
    FFSnapshot(0, 0, $dims[1]-1, $dims[2]-1)
    $pixelnum = 0
    For $y = 1 To $dims[2]
        For $x = 1 To $dims[1]
            If $loop = 1 Or $loop < 1 Then
            $pixelnum += 1
            $loop = 1
            Else
                $loop -= 1
            EndIf
            $idim = FileReadLine('testimg.pcs', 1)
            $dims = StringSplit($idim, ' ')
;~          SplashTextOn('', $pixelnum & '[' & $loop, 100, 100, 100, 100)
            If $pixelnum > $data[0] Then
                $overlim = True
                ExitLoop
            EndIf
            If StringInStr($data[$pixelnum], '-') <> 0 And $loop = 1 Or $loop < 1 Then
                $loop = 1
                $split = StringSplit($data[$pixelnum], '-')
                $loop = $split[2]
                $data[$pixelnum] = StringTrimRight($data[$pixelnum], StringLen($split[2])+1)
            EndIf
            If $data[$pixelnum] <> '/' Then
                FFSetPixel($x-1, $y-1, '0x' & StringTrimLeft(Hex($data[$pixelnum]), 2))
;~          Dim $GraphicalArray[$dims[1]*2][$dims[2]*2]
;~          $GraphicalArray[$x - 1][$y - 1] = GUICtrlCreateGraphic($x, $y, 2, 2)
;~          GUICtrlSetGraphic(-1, $GUI_GR_DOT)
;~          GUICtrlSetBkColor(-1, Hex($data[$pixelnum - 1]))
                WinSetTitle($map, '', '0x' & StringTrimLeft(Hex($data[$pixelnum]), 2))
            EndIf
        Next
        If $overlim = True then ExitLoop
    Next
    FFSaveJPG('MappedImg', $dims[1] + $dims[2], False)
EndFunc   ;==>__ImageMapping

 

Link to comment
Share on other sites

29 minutes ago, FrancescoDiMuro said:

Don't you see anything about Reg* functions in the Help file? Or Run, ShellExecute, @ComSpec ? :)

That has nothing to do with my question, i dont want to execute anything, i want to open a file with an autoit script

Link to comment
Share on other sites

  • DynamicRookie changed the title to [FIXED] Assign a file type to be opened with an AutoIt Program

Because you mentioned context menu (i assume windows context menu?) then it is logical that you would need to use the registry to place the necessary entries that will point to the application in cause. So in effect, in the command part of the registry, you can add the variable and the command that passes to the autoit application, something like:

autoitapp.exe /open %1

Then in the application itself, instead of cmdlineraw, you check the first cmdline for "/open" and then the second one will be the file.

This is how i did my context menus, not sure how you do it otherwise.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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...