Jump to content

Jeff West

Members
  • Posts

    11
  • Joined

  • Last visited

About Jeff West

  • Birthday January 5

Jeff West's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Good to see other PLC programmers on here. jhcd's version above returns the correct value as confirmed by a program from Lambert Bies (http://www.lammertbies.nl/download/lib_crc.zip). Both jchd's version and the one from Lambert Bies return a CRC16 value of 0x2780 for 0x010A. Your original post shows that you are expecting 0x8027 (high and low bytes swapped).
  2. Here's a snippet I got from somewhere that may help you get started: $oAcad = ObjGet("","AutoCAD.Application.16") If @error Then Msgbox(0,"ObjGet","Failed to open AutoCAD.Application.16 Object. Error code: " & hex(@error,8)) Exit Endif $strActiveDocument = $oAcad.Activedocument.Name MsgBox(0,"$oAcad.Activedocument.Name",$strActiveDocument) $iBlocks = $oAcad.Activedocument.Blocks.Count MsgBox(0,"$oAcad.Activedocument.Blocks.Count",$iBlocks) For $i = 0 to $iBlocks -1 $strBlockName = $oAcad.Activedocument.Blocks.Item($i).name If $strBlockName = "TITLEBLOCK" Then $iAttributes = $oAcad.Activedocument.Blocks.Item($i).GetAttributes() MsgBox(0,"GetAttributes()",$iAttributes) EndIf Next
  3. It's been a long time since I've used the AutoIt plugin with PowerPro, but I'll point you in the right direction. Join the "power-pro" group at Yahoo. The AutoIt plugin is located in the files portion of the group under "Plug-ins_and_add-ons/0_Interfaces/autoIt3/". --Jeff
  4. This was a big hit with my wife. I modified my copy to wait until she typed "Valentine" in Facebook, then the hearts popped up and began to play "Keeper of the Stars" (our wedding song). Thank you for the script. --Jeff
  5. Wouldn't this work? HotKeySet("{Pause}", "PauseFunc") While 1 ; Program here WEnd Func PauseFunc() HotKeySet("{Pause}") ;Deassign Pause Key Send("{Pause}") ;Send Pause so other programs will be able to respond HotKeySet("{Pause}", "PauseFunc") ;Do your toggle stuff here EndFunc ;==>PauseFunc
  6. It works great. Thank you for the time you put into solving this problem. --Jeff
  7. I'm using AutoIt 3.3.0.0 (the latest non-beta version) and XP Professional with Service Pack 3. I just tried running the same script in a Virtual PC running a clean build of XP Profession with Service Pack 2 and had the same problem. Same problem after compiling with 3.3.1.1 and even after rebooting. No I'm really confused. Is anyone else able to duplicate the problem? --Jeff
  8. I'm trying to use HotKey.au3 to use Win-L to lock the computer and run the screen saver based on a post from Lej. After pressing Win-L the computer locks and the screen saver runs. The problem is after I unlock the computer the keyboard locks up until I hit a modifier key (shift, ctrl, alt, or win). Try this to recreate: Have Notepad open when running the scriptRun the scriptPress Win-LUnlock the computerTry typing in NotepadTyping "l" the first time will allow all the alphanumeric keys to work. Typing "l' the second time will lock the computer without pressing the Win key.#include "HotKey.au3" #include "vkConstants.au3" HotKeySet("{Esc}", "_Quit") _HotKeyAssign(BitOr($CK_WIN, $VK_L), "ScreenSaver") While 1 Sleep(10) WEnd Func ScreenSaver() Local Const $SC_SCREENSAVE = 0xF140 DllCall('user32.dll', 'int', 'LockWorkStation') _SendMessage(_WinAPI_GetDesktopWindow(), $WM_SYSCOMMAND, $SC_SCREENSAVE, 0) EndFunc ;==>ScreenSaver Func _Quit() Exit EndFunc ;==>_Quit The problem isn't specific to Win-L. The same thing happens when I change the script to use Win-K (hitting "k" the second time will lock the computer) Any ideas on what I'm doing wrong? --Jeff
  9. Try this. --Jeff Dim Const $SC_CLOSE = 0xF060 Run("Notepad") WinWait("Untitled - Notepad") $handle = WinGetHandle("Untitled - Notepad") $dSysMenu = DllCall("User32.dll", "hwnd", "GetSystemMenu", "hwnd", $handle, "int", 0) $hSysMenu = $dSysMenu[0] DllCall("User32.dll", "int", "RemoveMenu", "hwnd", $hSysMenu, "int", $SC_CLOSE, "int", 0) DllCall("User32.dll", "int", "DrawMenuBar", "hwnd", $handle)
×
×
  • Create New...