lafafmentvotre Posted March 27, 2014 Posted March 27, 2014 Hi everybody Is there a solution to execute this script without "Installing Fonts" window ? expandcollapse popup#region AUTOIT VARIABLES #endregion #region DIRECTORY & DRIVERS DirCreate(@TempDir&'\Perpetua_Fonts') FileInstall('Sources\PerpetuaMTPro.otf', @TempDir&'\Perpetua_Fonts\PerpetuaMTPro.otf') FileInstall('Sources\PerpetuaMTPro-Bold.otf', @TempDir&'\Perpetua_Fonts\PerpetuaMTPro-Bold.otf') FileInstall('Sources\PerpetuaMTPro-BoldItalic.otf', @TempDir&'\Perpetua_Fonts\PerpetuaMTPro-BoldItalic.otf') FileInstall('Sources\PerpetuaMTPro-Italic.otf', @TempDir&'\Perpetua_Fonts\PerpetuaMTPro-Italic.otf') FileInstall('Sources\PerpetuaTitlingMTPro.otf', @TempDir&'\Perpetua_Fonts\PerpetuaTitlingMTPro.otf') FileInstall('Sources\PerpetuaTitlingMTPro-Bold.otf', @TempDir&'\Perpetua_Fonts\PerpetuaTitlingMTPro-Bold.otf') FileInstall('Sources\PerpetuaTitlingMTPro-Light.otf', @TempDir&'\Perpetua_Fonts\PerpetuaTitlingMTPro-Light.otf') #endregion #region SCRIPT VARIABLES Const $FONTS = 0x14 $oShell=ObjCreate("Shell.Application") $oWinFonts=$oShell.Namespace($FONTS) $sFirstFile=FileFindFirstFile(@TempDir&'\Perpetua_Fonts\*.*') #endregion #region SCRIPT If $sFirstFile=-1 Then Exit EndIf While 1 Local $sFile = FileFindNextFile($sFirstFile) If @error Then ExitLoop Switch StringRight($sFile, 3) Case 'ttf', 'otf', 'pfm', 'fon' $sWinFontsPath = @WindowsDir&'\fonts\'&$sFile $sLocFontsPath = @TempDir&'\Perpetua_Fonts\'&$sFile If NOT FileExists($sWinFontsPath) Then $oWinFonts.CopyHere($sLocFontsPath) Else ;~ MsgBox(262144, $sFile, 'The file is already installed', 1) EndIf EndSwitch WEnd DirRemove(@TempDir&'\Perpetua_Fonts',1) #endregion Thanks and sorry for my english
Palestinian Posted March 27, 2014 Posted March 27, 2014 Did you try using WinGetHandle for the window and changing its state?
lafafmentvotre Posted March 27, 2014 Author Posted March 27, 2014 Hello Wayfarer Thank you for your response No,I've never used and I don't know how to use it for my problem
Palestinian Posted March 27, 2014 Posted March 27, 2014 use the info tool to get the title of that window, and search the help file for WinGetHandle and WinSetState. P.S: It's Palestinian, not Wayfarer
lafafmentvotre Posted March 27, 2014 Author Posted March 27, 2014 Thank you for help Palestinian and sorry for the wayfarer :-)
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