Jump to content

skyee

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by skyee

  1. Excellent work! Thank you so much
  2. Anyone?
  3. I tried this: Func InstallFont($sSourceFile, $sFontDescription, $sFontsPath) Local Const $HWND_BROADCAST = 0xFFFF Local Const $WM_FONTCHANGE = 0x1D Local $sFontsPath = "\\server.local\Software\_Install\_Default\1\CORPORATE FONT\" Local $sFontFileName = StringRegExpReplace($sSourceFile, '^.*\\', '') If Not FileCopy($sSourceFile, $sFontsPath & "\" & $sFontFileName, 1) Then Return SetError(1, 0, 0) Local $aRet = DllCall("gdi32.dll", "Int", "AddFontResource", "str", @WindowsDir & "\fonts\" & $sFontFileName) If IsArray($aRet) And $aRet[0] > 0 Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", $sFontDescription, "REG_SZ", $sFontFileName) DllCall("user32.dll", "Int", "SendMessage", "hwnd", $HWND_BROADCAST, "int", $WM_FONTCHANGE, "int", 0, "int", 0) Return 1 EndIf Return SetError(2, 0, 0) EndFunc But it doesn't work I would _really_ like someone to help me out here.. Fonts just dont seem to install. And I'm a script noobie
  4. Do you mind modifying this to enter source of my fonts? (\\server.local\Software\_Install\_Default\1\CORPORATE FONT\) since I admit have no clue where to put source from where script will get fonts?
  5. This is the current font install script: $sFileName = '\\server.local\Software\_Install\_Default\1\CORPORATE FONT\*.*' If FileCopy($sFileName, @WindowsDir & '\Fonts',1) Then $sFileName = @WindowsDir & '\Fonts\' & StringTrimLeft($sFileName, StringInStr($sFileName, '\', 0, -1)) DllCall('gdi32', 'long', "AddFontResourceA", 'String', $sFileName) EndIf The fonts get copied, however they're not registred with system when I try to use them in i.e. MS Word. What else needs to be done?
  6. Mhh, this is furstrating me RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe") ControlClick("Adobe Reader 8.1.1 - Setup", "&Next >",4081 [,Button1 [, 1, 382, 281 ]]]] ) ControlClick("Adobe Reader 8.1.1 - Setup", "&Install >",4334 [,Button1 [, 1, 306, 324 ]]]] ) This is what i came up with, but i'm guessing it's way wrong since ControlClick should be somehow integrated with RunWait command? I know this looks stupid but I've only started using AutoIt few days ago... Besides, isn't there simplier way to do this or do you really need coordinates and all that? that's why I was thinking about send() function...
  7. So it should be: RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe") controlclick("Adobe Reader 8.1.1 - Setup", "text", controlID [, Next [, 4 [, x [, y ]]]] I'm not quite sure what to put in "text" and ControlID and x,y? How do you know coordinates?
  8. So presumably, I have this line of code: RunWait("\\server.local\Software\_Install\_Default\1\AdbeRdr811_en_US.exe ") This command executes the installer. Along with this command, I'm wondering if it's possible using send() function to allow AutoIT to click buttons "Next" or "Agree" instead of user intervention? Like a recorded macro or something? Suggestions welcome
  9. Thank you very much! I was so near the solution, heh. Tried to play around with quotation marks myself but as I see I failed miserably )
  10. DIM $USER $USER=InputBox ( "User", "Enter username:") run("net localgroup Network Configuration Operators domain\$USER /add") ^^ this is the code, but it's not functioning. First, I think it doesn't even grab $USER parameter, secondly the command should be like: net localgroup "Network Configuration Operators" domain\$USER /add - note the quotation marks on the group! without them, you cannot add user to that group. I'd appreciate very much for helping me with this piece of code, since I'm a beginner - and have problems as such
×
×
  • Create New...