Jump to content

_makepath


Recommended Posts

HI,

hmmh :think: you mean something like this?

#include <file.au3>
MsgBox(0,"", _PathMake("c" , "\folder", "file", "extension"))

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

HI,

hmmh :think: you mean something like this?

#include <file.au3>
MsgBox(0,"", _PathMake("c" , "\folder", "file", "extension"))

So long,

Mega

Yes its included in the file.au3

I want to create a path to a directory like @tempdir or mydocumentsdir

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

Yes its included in the file.au3

I want to create a path to a directory like @tempdir or mydocumentsdir

HI,

why not just using the macro? Or something like

#include <file.au3>
MsgBox(0,"", _PathMake("c" , "\folder", "file", "extension"))
$path = @mydocumentsdir;@TempDir
MsgBox(0,"", $path)
;ConsoleWrite($path)

???

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

I tried your example and it worked fine for me.

#include <guiconstants.au3>
FileInstall("C:\Temp\WinInfo.exe", @TempDir & "\WinInfo.exe",1)
Local $ButtonMenuText[4] = ['', 'Notepad', 'WinInfo', 'MSPaint']; Will need beta to run an Array like this example
Local $ButtonMenuCommands[4] = ['', 'Notepad.exe', @TempDir & '\WinInfo.exe', 'MSPaint.exe']

(You know that c:\temp istn´t @TempDir? I think you knew that. :think: )

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

I tried your example and it worked fine for me.

#include <guiconstants.au3>
FileInstall("C:\Temp\WinInfo.exe", @TempDir & "\WinInfo.exe",1)
Local $ButtonMenuText[4] = ['', 'Notepad', 'WinInfo', 'MSPaint']; Will need beta to run an Array like this example
Local $ButtonMenuCommands[4] = ['', 'Notepad.exe', @TempDir & '\WinInfo.exe', 'MSPaint.exe']

(You know that c:\temp istn´t @TempDir? I think you knew that. :( )

So long,

Mega

yes i know that and i know that you can use @tempdir & \wininfo.exe but then the (little) :think: problem is that the buttonmenu is to large

Sapiente vince, rex, noli vincere ferro!

Link to comment
Share on other sites

yes i know that and i know that you can use @tempdir & \wininfo.exe but then the (little) :( problem is that the buttonmenu is to large

Hi,

:think: what do you mean with too large? The text size is the same. ???

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Moderators

Just make a seperate Array for file location and button name using _PathSplit() (file name and extension) for the button name.

Edit:

Or use the same array, but when using GuiCtrlCreateButton() only use:

$Path = _PathSplit($FileLocationName, $sdrive, $sdirectory, $sname, $sextension)
$button[1] = GuiCtrlCreateButton($Path[3] & $Path[4])

While 1
   If $Msg = $button[1] Then Run($Path[0])
Wend
pseudo code... just ideas. Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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