Jump to content

peter1234

Active Members
  • Posts

    113
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

peter1234's Achievements

Adventurer

Adventurer (3/7)

1

Reputation

  1. The Kandie Man, Do you realize that Lame is a command line encoder? For example, : mode = stereo : bit rate = 96 kbps : input = audio.wav : output = audio.mp3 would be called as: lame -m s -b 96 audio.wav audio.mp3
  2. rnj See help file ... RUN WAIT only works with executable file.
  3. Simucal, Is there an option to get the sample rate of a wave file?
  4. Infinitex0, WinSetState should also do that.
  5. Baz, Thanks. Sometime I may want to send data in and out the LPT port and this will come in handy. What was the site you found the information on? Was it http://www.logix4u.net ?
  6. CyberSlug, Thanks. This works perfect using Windows XP. #include <GuiConstants.au3> FileChangeDir (@ScriptDir) $FontFile="ariblk.ttf" _FontInstall ( $FontFile ) MsgBox(0, "Font Installed", $FontFile ) Func _FontInstall ( $FontFile ) FileCopy ( $FontFile, @WindowsDir & "\Fonts" ,1 ) Run("explorer " & @WindowsDir & "\Fonts", "", @SW_HIDE) WinWait("Fonts") WinClose("Fonts") EndFunc
  7. I have noticed that if I just copy the font to the font folder and then open and close the Font folder, the font gets registered OK. But I haven't figured out how to get AutoIt to open and close the font folder in a script.
  8. gafrost, Thanks. That works, but font is not installed correctly. Font does show up in Word and can be used in AutoIt scripts, but Font does not appear in Font folder and is not detected by The Font Thing program.
  9. JdeB, This works but The Font Thing shows a warning symbol next to font and is not able to uninstall the font, so I think it is not being installed correctly. But it works, thanks. Font was in same folder as script. #include <GuiConstants.au3> #include<file.au3> FileChangeDir (@ScriptDir) $rc = InstallFont("ariblk.ttf","Arial Black") ConsoleWrite('@@ Debug(2) : $rc = ' & $rc & @lf & '>Error code: ' & @error & @lf);### Debug Console MsgBox(0, "Font Installed", "Arial Black ") ; Func InstallFont($SourceFile,$FontDescription) Local $HWND_BROADCAST = 0xFFFF Local $WM_FONTCHANGE = 0x1D Local $null, $FontFile, $FontExt _PathSplit($SourceFile,$null,$null,$FontFile,$FontExt) $FontFile = $FontFile & $FontExt Local $rc = FileCopy($SourceFile,@WindowsDir & "\fonts\" & $FontFile,1) If $rc = 0 Then SetError(1) Return 0 EndIf Local $res = DllCall("gdi32.dll","Int","AddFontResource","str",@WindowsDir & "\fonts\" & $FontFile) If $res[0] > 0 Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", $FontDescription, "REG_SZ", $FontFile) DllCall("user32.dll","Int","SendMessage","HWND",$HWND_BROADCAST,"int", $WM_FONTCHANGE,"int", 0,"int", 0) Return 1 Else SetError(2) Return 0 EndIf EndFunc
  10. gafrost, Thanks. When I tried this I got a DllStructDelete($s_p) error. Font was in same folder as script. ;>>>>>> NOTE - REQUIRES BETA AUTOIT AND COMPILER <<<<<<<<< #include <GuiConstants.au3> FileChangeDir (@ScriptDir) _LoadFont("ariblk.ttf") Func _LoadFont($Fontname) $s_p = DllStructCreate("char[" & StringLen($Fontname) + 1 & "]") If @error Then Return @error EndIf DllStructSetData($s_p, 1, $Fontname) $msg = DllCall("gdi32.dll", "int", "AddFontResource", "ptr", DllStructGetPtr($s_p)) DllStructDelete($s_p) If @error = 1 Then MsgBox(0, "DLLcall", "unable to use the DLL file") If @error = 2 Then MsgBox(0, "DLLcall", "unknown return type") Return $msg[0] EndFunc ;==>_LoadFont
  11. I used a free exe called fontinst.exe from ParaType Software. That requires creating a folder and flashes a message box but works fine. I hope someone who knows DLLs will make a _FontInstall UDF. In the mean time, I recommend fontinst.exe for anyone else wanting to do this.
  12. strate, Thanks for the reply, but that does not work either.
  13. Does anyone know how to install a new font using AutoIt? Just adding the font to the font folder using FileInstall does not work.
  14. Perhaps I did not understand. In which case I am sorry for wasting your time. Then again, perhaps you did not understand. In which case I will try to help you understand... Each transparent region is a small window that has an image in it with a transparent background. There can be many of these windows. The windows can be moved anywhere on top of a background image (or anyhing else, even other transparent regions) and the image in the window will be on top with the image under the window showing through the transpartnet part of the window. Thus each window is like an icon with a transparent background. Isn't that what you wanted? I am not an experienced programer. There may be a better way of doing what you want, but that is the only way I can think of. Sorry if it does not help.
  15. Markus, The trasparent region should do exactly what you want. I have no idea how to read DLLs. Do not expect that there will be a lot of people just waiting to answer your questions when you post them. Most people have other more important things they should be doing.
×
×
  • Create New...