Jump to content

mlowery

Active Members
  • Posts

    39
  • Joined

  • Last visited

Recent Profile Visitors

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

mlowery's Achievements

Seeker

Seeker (1/7)

2

Reputation

  1. I initially made a bad assumption when resolving the email address of an appointment "organizer" that they would be in Outlook as a contact, which is not always the case. I've updated to correct this.
  2. From testing, appointments are everything in the calendar folder; meeting items seem to be the various inbox items to request/confirm an appointment. Your help led me to how to map a "user name" to an email address, and I've updated Now everything works great!!! Thanks!
  3. As a follow-up, looks like there isn't always a "SenderEmailAddress", or at least it's not part of the AppointmentItem object. I haven't checked the recipients list. Since the script I'm using is exporting a read-only calendar, I'd chosen to discard the recipients list, since it can be really large and isn't important for knowing what meetings are scheduled. I may look into that option, but would be worried about the time to iterate through several dozen names for every appointment when I already know the name of the organizer. I'll watch for your new UDF thread and see what else presents itself; if you find anything else, please let me know. Cheers!
  4. I recently posted a to extract calendar items from Outlook and post them in iCalendar format. One thing that I didn't figure out was how to do a lookup from a full name to an email address. In the case of calendar items, I have the full name of the "organizer" for a meeting, and would like to fetch that person's email address. The email address for the organizer will be found in the "global address book," not the local "contacts" folder. Any tips?
  5. Here's a method to publish an Outlook calendar to an iPhone without iTunes, or using an Exchange account. It's great if you use Outlook at the office and want an easy way to put your work calendar on your phone. This script exports Outlook calendar items to an iCalendar file, and uses the free Dropbox service to publish the file to an online account so your iPhone can subscribe to it. The script can be run as a scheduled event to periodically check and update your calendar as it changes throughout the day. The published calendar is "read-only" on the iPhone. As written, this script publishes all events from the current day to current day+30, but it's easily configurable. All the essential appointment fields are published -- categories and other fields that are not displayed are ignored, but again, could easily be added if you use them. Similarly, if you don't want to use Dropbox and you have online storage elsewhere, you could use _FTP functions to upload the file to your own server. The script has been tested on 32-bit Win XP and Office 2007 systems. If you have another system or find a bug, please post. Any troubleshooting or improvements are welcome! UPDATE: Corrected error for appointments created by people not within Outlook UPDATED: The email address of the "organizer" of any meetings is now available and links to your iPhone contacts. Outlook to iCal.au3
  6. Here's one I've used while watching long online videos, almost exactly like PsaltyDS says. You can set the $idle_limit to anything as long as its less than the time you've set for a screensaver, and just hit BACKSPACE to disable it when you don't need it anymore. #include <Date.au3> ;=============================================================================== ; Description: Moves mouse periodically to prevent screen saver ;=============================================================================== $idle_limit = 2 * 60 * 1000; 2 minutes * 60 sec * 1000 msec (should set this to less than screensaver time) $offset = 1 ; how far to move the mouse ;=============================================================================== ; MAIN ;=============================================================================== HotKeySet("{BACKSPACE}", "done") While 1 If _Get_Idle_Ticks() > $idle_limit Then $mouse = MouseGetPos() MouseMove($mouse[0] + $offset, $mouse[1] + $offset) $offset = -$offset EndIf Sleep(100) WEnd ;=============================================================================== ; Description: ; Parameter(s): ; Requirement(s): None ; Return Value(s): ; Note(s): ;=============================================================================== Func done() HotKeySet("{BACKSPACE}") Send("{BACKSPACE}") ; Backspace is passed through in case user forgets to disable the script Exit EndFunc ;=============================================================================== ; Description: Returns number of ticks since system was idle (determined by mouse/key input) ; Parameter(s): None ; Requirement(s): None ; Return Value(s): Milliseconds since last user input (mouse/key) ; Note(s): ;=============================================================================== Func _Get_Idle_Ticks() Local $struct = DllStructCreate("uint;dword"); DllStructSetData($struct, 1, DllStructGetSize($struct)); DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($struct)) Local $last_active = DllStructGetData($struct, 2) Return _Date_Time_GetTickCount() - $last_active EndFunc
  7. Is this an AutoHotKey script? Because the SENDs are not in AutoIt syntax. You need curly braces around special keys like {ENTER}, but not around basic letter keys, though you may need a modifier like {ALTDOWN}...{ALTUP}. After you fix that, try ending your "SEND" strings with keystrokes ({TAB}, {ENTER}, etc.) instead of ControlClick() or add a SLEEP delay to ensure that the SEND has completed before the ControlClick executes.
  8. Have a look at DriveMapGet() if you need to determine the path that Q: points to. If you want to make sure that Q: has been mounted, you can force it to mount using the DOS "NET USE" commands, which will do the drive mapping through a command line. I do this for a script that scans a mapped network directory. I first check to see whether FileExists("Q:\"), and if not, I run the "NET USE" command to mount the drive before doing the scan.
  9. You might also consider looking at the "Switch...Case...EndSwitch " conditionals, since you're checking for specific usernames, and put the various Copy/Remove steps into a single function (using the username as a passed parameter) to eliminate code duplication. Func SetupACAD($USERNAME) .. appropriate copy/remove steps here, such as: DirCopy("C:\Program Files\AutoCAD 2010\SOCO\setup\support\acad_cui\" & $USERNAME, @AppDataDir & "\AutoDesk\AutoCAD 2010\R18.0\enu\Support", 1) EndFunc
  10. Thanks heaps! You put me on the right track with the DllStruct* items. Apparently, it's necessary to read the result from the example I posted by using DllStructGetData. It's really not documented or shown in the help or examples. I needed: $foo = _WinAPI_GetTextExtentPoint32($hDC, $sText) $x = DllStructGetData($foo,"X") $y = DllStructGetData($foo,"Y") ConsoleWrite($x & @TAB & $y & @CRLF) I also had to use _WinAPI_SelectObject($hDC, $hFont) instead of _WinAPI_SetFont($hDC, $hFont), but it looks like things are working now!
  11. I'm using Prospeed to do some on-screen rendering. In order to center text, I need to know the rendered width/height of the text, so have been looking at the _WinAPI_GetTextExtentPoint32 function, but I'm not getting it to work. What am I doing wrong? #include <WinAPI.au3> #include <FontConstants.au3> $hDC = _WinAPI_GetDC(0) ConsoleWrite("hdc: " & $hDC & @CRLF) $hFont = _WinAPI_CreateFont(42, 800, 0, 0, $FW_NORMAL, False, False, False, _ $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial') _WinAPI_SetFont($hDC, $hFont) ConsoleWrite("fonth: " & $hFont & @CRLF) $sText = "This is a string" $foo = _WinAPI_GetTextExtentPoint32($hDC, $sText) If Not IsArray($foo) Then ConsoleWrite($foo & @CRLF) Else ConsoleWrite($foo[0] & @TAB & $foo[1] & @CRLF) EndIf
  12. I have some variable-length text (artist and title from MP3) to draw with Prospeed. How can I figure out the dimensions of the text or otherwise center the text on a drawing surface? Edit: Looks like this is possible using the _WinAPI_GetTextExtentPoint32 function as in this thread: Measure String Length
  13. Yup, that's what I started from. GavinCampbell did a great job setting up the basics. I just renamed some functions to match the native DLL calls. Unless there's something unique about my system, his UDF may have the same issues with Unicode. ANSI works great, though. The AGID3V2GetTextFrameW() function I implemented was based on his DLL calls (I'm still learning about them, so needed a starting point). I really think there's something weird about these particular files[*], so I'm going to follow up with the DLL author and see what his input is. When I get a response I'll update. Thanks for the help so far! [*]Tag weirdness, is as I mentioned upthread, is the whole reason for the script. Podcasts are tagged really inconsistently, even from episode to episode. The script I'm working on normalizes them at the tag and audio level.
  14. I must have scrolled past that option dozens of times in the Help file and never noticed it. Changing the calling method causes the script to bomb out immediately after the call without executing the next line, unfortunately. Digging through the AudioGenie docs, I see that the return result is apparently being passed as a BSTR instead of LPCWSTR, and that might be an issue, though I would think it would fail outright rather than working with ANSI, which it does. But I'm really inexperienced with DLLs and internal variable formatting. BSTR a basic string starting with 4 bytes length info followed by a sequence of 16bit Unicode chars (UTF-16) LPCWSTR a pointer to a sequence of 16bit Unicode chars (UTF-16), terminated with $0 $0
  15. Thanks. I am on the latest AU3 build and the DLL doesn't trigger an @error. I'm beginning to suspect there's something odd about those particular files or original tags themselves. One MP3 program can read the tags (Winamp) and another one can't (MediaMonkey) and both are supposed to support Unicode. The AudioGenie DLL works fine for everything else I've thrown at it, though I don't think any of the other ones I've worked with have Unicode tags. Instead of using "wstr" as the return type for the DllCall, is it possible to use a DllStruct that's just a binary buffer as the return type so I can see exactly what the DLL is returning? Maybe that's barking up the wrong tree.
×
×
  • Create New...