avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • July 19, 2019, 05:45 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - r0bertdenir0 [ switch to compact view ]

Pages: prev1 [2]
skrommel's got a nice autohotkey script called ghoster which highlights the foreground window & dims the non-active windows & desktop.
By setting a blurry glass picture as the image for his program you can create an effect much like this.
The demo above is cool as a concept but unless you have just 1 app open it would be unusable 2 have say a translucent spreadsheet over Firefox.
Give the Ghoster script a shot - use a frosted glass picture & set the transparency at about 80.

Developer's Corner / Re: Automated Builds for Visual Basic 6
« on: June 07, 2009, 02:27 AM »
tinjaw I don't know how yr situation applies 2 the original question, but going on the original issue of linking to a CAD program that frequently breaks binary compatibility & forcing a recompile...
Why not use late binding instead?
In that situation what I would try is 2 create the project as normal, linking to type libraries & such so that you get the full benefit of intellisense.
When everything is working, change yr strongly typed references to the 3rd party library with Variants or Objects.
Also replace all uses of the NEW operator with CreateObject & remove the project references to those controls or dlls.
You only need to do this for 3rd party objects that might break binary compatibilty.
Also keep in mind the Add Components dialog which has a checkbox to "REMOVE INFO ABOUT UNUSED ACTIVEX CONTROLS" - you may need to check/uncheck that (I forget which ;))
If you take this scripting-like approach, binary compatibility should not be an issue.
However you're still gonna have some apps which change the structure of their exposed objects but that would always be a recompile...

Have you used AutoHotkey?
It can do everything NirCmd can do & much more.
If you have a look at skrommels scripts you'll get an idea of what's possible.

Coding Snacks / Re: *SIMPLE* WebCam software
« on: June 07, 2009, 01:33 AM »
I was looking for exactly the same thing a few years ago 2 have an unobtrusive webcam video while I work.
I found the best solution 4 my needs was the VLC Media Player. You can detach the video window interface from the main window thru the options.
But the decider for me was that the install includes an viewer ActiveX control so you can create yr own custom viewer to suit yr exact needs.
If I remember correctly, with the right settings, the VLC player even supports transparency which most other players don't.
If you try it & want some help with the connection strings let me know cos I have the VB code around somewhere.

I think f0dder is right. I tried 2 do this in VB 4 a picture database app by writing the picture to an IStream & it worked great to let COM do the serial/deserialize hard work, but then I noticed the file size! >:(
The technique is used was 2 create a wrapper class for the picture object - you can give it a Load method that that calls yr normal method of loading a picture from file, but yr Load method will also create a char array & copy the actual file into that array.
So you are loading the file into a normal picture object & uncompressing it, but also saving the original compressed file in wateva format it may be.
To deserialize, write the array to a file & read the file.
If you wanna put in the effort to make it faster then you could probably find a way to deserialize the memory char array directly.

But yeah, you have to approach the serialize/deserialize thing differently when dealing with compressed data.

Post New Requests Here / Re: IDEA: Mouse to Keyboard Mapper
« on: April 30, 2009, 07:10 PM »
Well I don't think the mouse wheel is supported, but much of wat you describe can be done with the builtin Windows MouseKeys feature.
Goto Control Panel->Accessibility Options, click the Mouse tab.

Hey I'm ambidextrous so I'd luv 2 independent mice! :Thmbsup:
But tracking 2 cursors moving independently wud leave us cross-eyed eventually I guess... ;)
Well a standard mouse has 3 buttons, 5 if you include WheelUp & WheelDown.
If you then get a mouse with the side buttons that AHK treats as XButton1 & 2, that gives you 7 buttons!
AHK then lets you use the & operator to create combination hotkeys such as MButton & WheelDown.
If my math is correct that gives you 49 possible combinations, plus 7 individual keys so you cud program 56 actions on a 5 button mouse.
Of course you can't always use all 56 because using say LButton in a combo hotkey wud affect yr ability to drag items sometimes.
But I think that wud still leave you with more than 20 key combos.

But if you're gonna use 2 mice - I'm assuming 1 in each hand - then yr other hand cud just as easily operate the keyboard 2 press a modifier key so you can do Ctrl+Lbutton or even F1+Wheelup....


WinActivateWait ?

Post New Requests Here / Re: Cutting out the taskbar
« on: April 30, 2009, 06:16 PM »
This AHK script should let you toggle the taskbar using Shift-Escape

    ControlGet, hWndTaskbarAppsBar, hWnd, , Running Applications, ahk_class Shell_TrayWnd

   boolAppToolbarVisible := DllCall("IsWindowVisible", "UInt", hWndTaskbarAppsBar) 
      WinHide, ahk_id %hWndTaskbarAppsBar%
      WinShow, ahk_id %hWndTaskbarAppsBar%   


If it's still available then I don't think you deleted it from the GUI, maybe just closed it?
Open the Customize Toolbars dialog, in the list of toolbars, click on Virtua & then click the Delete button on the right. :Thmbsup:

Post New Requests Here / Re: Apply Conditional Formatting To .csv
« on: April 29, 2009, 05:15 PM »
Just thinking off the top of my head here...

Yr script will always generate a CSV with the same filename?
If you can fix the path of the CSV, then you can have an actual Excel spreadsheet which then links 2 the CSV, using it as a datasource.
Just go Data->Import in Excel the first time.
Then every other time after exporting yr eventlog, just open yr spreadsheet & do a refresh 2 update yr data.

Excel helps you out cos whenever you refresh yr data, it creates a named range (after the original file) which is exactly the size the data occupies.
It's simple 2 wrote a macro 2 operate on that named range & do yr conditional formatting.
You can also do it automatically by having the macro run everytie the data is refreshed.
But if you don't know VB start with the macro & take it from there

Just another method that might do wat you want...

Why not use 2 tools, DoubleKillerPro which deletes all yr duplicate files & works fine 4 you.
And then a second tool which deletes empty folders.
In order 2 do what you ask, you can't compare folder size.
Folders r just containers, all identical - Duplicate folders are caused purely by duplicate files.
I've never used DoubleKillerPro but I wud think it's not working on file size but rather calculating a hash-value 4 every file (using sumthing like SHA1?) it finds & building a list.
It wud then look at all files with identical hashes & consider them identical.
So really you have 2 kill the duplicate files & then look for empty folders.
Deleting empty folders can be done easily enuf with vbscript

Here's a simplified macro  - no command bar stuff, you doing that yrself.
The reason why it was not setting the category when no inspector was open are the lines:
If (Err = 0) Then
End If
Sum items don't support categories, like meetings but they can be in yr inbox so they cause an error which we have 2 ignore.
The problem is when there is no inspector open, the inspector code:
If (ActiveWindow.Class = ActiveInspector.Class) Then
generates an error, "Object not set" becos without an open inspector ActiveInspector is Nothing & we can't call ActiveInspector.Class. >:(
Altho the code inside the IF statement is not run, the IF statement itself causes a runtime error.
This error then gets carried down 2 the
If (Err = 0) Then
& so the category is set on the item, but the change is not saved. >:(

Hope I have you sufficiently confused :D

Option Explicit

Private Const MY_CUSTOM_CATEGORIES__ = "1 - Client - sent to"

Public Sub SetCustomCategoriesForItems()
On Error Resume Next
Dim oItem As Object
    '**first check if a single mail item is open 4 viewing & deal with that case first
    If (ActiveWindow.Class = ActiveInspector.Class) Then
        '**get the item we're viewing
        Set oItem = ActiveInspector.CurrentItem
        '**set their categories if they have the property
        oItem.Categories = MY_CUSTOM_CATEGORIES__
    End If
    If (ActiveWindow.Class = ActiveExplorer.Class) Then
        '**loop thru selected items
        For Each oItem In ActiveExplorer.Selection
            '**clear the error buffer here in case the are mail items mixed with other items in folder - also the call to ActiveInspector.Class above has caused an error
            '**set their categories if they have the property
            oItem.Categories = MY_CUSTOM_CATEGORIES__
            '**save our change
            If (Err = 0) Then
            End If
        Next oItem
    End If
End Sub

OK. I'm just adding the command bars programmatically & you're doing it thru the user interface.
That's cool.
Yes the text of the button does change while it's working but you wud only notice it when you have many items selected - otherwise 2 fast as you noticed.
Since you comfy adding the command buttons yrself & linking them, I'll show you how 2 just have a macro with none of the other stuff.
I don't understand about you saying it don't work when the a mail is selected but not open cos I tested that here & it worked.

Try this.
The CustomActions_Categories() function will first check if there is an Inspector open & only if there isn't, look at the ActiveExplorer.
The other change I made was 2 make this function Public so you can call it like a macro from yr command button.
But let me know how you did that without a CommandBar - if you're using a VBA UserForm or you're editing the MessageForm design in Outlook.
Especially if it's the latter cos I've neva done that so I'd like 2 know! :D

But my advice wud be 2 keep the toolbar in the main Outlook window as well as yr CommandButton in the mail inspector.
Cos there will be times when you don't wanna open every item but just select half yr mailbox & hit go.

Option Explicit

Private Const MY_CUSTOM_TOOLBAR__ = "Virtua"
Private Const MY_CUSTOM_CATEGORIES_BUTTON__ = "Set Categories"
Private Const MY_CUSTOM_CATEGORIES__ = "1 - Client - sent to"

Public Sub AddCustomCategoriesToolbar()
On Error Resume Next
Dim oNewCmdBar As CommandBar
Dim oNewButton As CommandBarButton
    '**first check if toolbar exists
    Set oNewCmdBar = Application.ActiveExplorer.CommandBars.Item(MY_CUSTOM_TOOLBAR__)
    '**otherwise create it
    If (oNewCmdBar Is Nothing) Then
        Set oNewCmdBar = Application.ActiveExplorer.CommandBars.Add(MY_CUSTOM_TOOLBAR__)
    End If
    '**first check if button exists
    Set oNewButton = oNewCmdBar.Controls.Item(MY_CUSTOM_CATEGORIES_BUTTON__)
    '**otherwise create it
    If (oNewButton Is Nothing) Then
        Set oNewButton = oNewCmdBar.Controls.Add(msoControlButton)
    End If
    '**set the caption & macro to run
    oNewButton.Caption = MY_CUSTOM_CATEGORIES_BUTTON__
    oNewButton.OnAction = "CustomActions_Categories"
    '**by default they are created invisible
    oNewButton.Visible = True
    oNewCmdBar.Visible = True
End Sub

Public Sub CustomActions_Categories()
On Error Resume Next
Dim oItem As Object
Dim oNewCmdBar As CommandBar
Dim oNewButton As CommandBarButton
    '**first check if a single mail item is open 4 viewing & deal with that case first
    If (ActiveWindow.Class = ActiveInspector.Class) Then
        Set oItem = ActiveInspector.CurrentItem
        '**set their categories if they have the property
        oItem.Categories = MY_CUSTOM_CATEGORIES__
        '**we don't save in this case, this allows you 2 cancel changes you made 2 the item
        '**you'll be asked 2 save when you close - I think this is expected behavior
        '**if you disagree uncomment line below but keep in mind you may have made other changes 2 the item which will also be saved
        Exit Sub
    End If
    Set oNewCmdBar = Application.ActiveExplorer.CommandBars.Item(MY_CUSTOM_TOOLBAR__)
    Set oNewButton = oNewCmdBar.Controls.Item(MY_CUSTOM_CATEGORIES_BUTTON__)
    oNewButton.Caption = "Working..."
    '**loop thru selected items
    For Each oItem In ActiveExplorer.Selection
        '**set their categories if they have the property
        oItem.Categories = MY_CUSTOM_CATEGORIES__
        '**save our change
        If (Err = 0) Then
        End If
    Next oItem

    oNewButton.Caption = MY_CUSTOM_CATEGORIES_BUTTON__

End Sub

I understand wat you mean about changing an open item. I'll post the macro 2 do that in a bit let me just test it.
How wud you create the command button & link it 2 the macro?
I mostly work in Excel which handles macros more easily so I'm curious 2 know how you link them.

If you're saying wat I think you're saying it's not possible to just flip text - if I had 2 guess I'd say you have 2 hack the system files like gdi32 & intercept all programs trying 2 draw text.
You want 2 do this as a novelty or just 2 see if you can get used 2 reading text upside down?
That wud be good exercise I think - like da vinci used 2 write like a mirror reflection.
If you just want the brain exercise so you don't get alzheimers later, check if yr graphics driver supports flipping the whole screen!
Most do - I know the intel drivers do.

If you just want text flipped, my advice is 2 find an upside-down font (google) or create yr own if you can't find 1.
The you can ask 4 an AHK script that will toggle yr system font between normal & yr new font.

Post New Requests Here / Re: IDEA PC/Hard Drive Security Pre Boot
« on: April 29, 2009, 11:01 AM »
Truecrypt allows you 2 create hidden volumes.
When you create a new encrypted volume, it gives you the option of created a hidden volume.
Basically your encrypted partition or file has 2 parts 2 it & you set a different password for each.
If you're forced to give up the password, give the password to the decoy volume.
Becos the data on the volume is randomized, there is no way to prove or even detect if there is a hidden volume.
Have a look at the truecrypt dox & search for Hidden Volume

Post New Requests Here / Re: IDEA: hidden image finder
« on: April 29, 2009, 10:52 AM »
Speaking from a gut feel I don't think this is possible unless you understand the algorithm that overlaid the 2 images in the first place.
There are literally countless ways to do create a watermark this way.
Basically you can just make a translucent image & overlay it on the original.
But I'm sure you would find cases in which this results in something undesirable & so the programmers probably fine tuned the method to cope with this.
So I'd say it can be done but yr best chance would be if you had detailed info about the source code algorithm.

Staggered progress bars are so 90s...

Something like this maybe...
That's the basic structure I think - you'd just have to modify the IF statements that generate the tooltip so that it reads from a joke file, shows weather info, or even show reads nosh's My Pictures folder to show those girlie pix in a splash screen...

#UseHook On

IDC_WAIT := 32514

      hCurAppStarting := DllCall("LoadCursor", "Uint", NULL, "Int", IDC_APPSTARTING, "Uint")
      hCurWait := DllCall("LoadCursor", "Uint", NULL, "Int", IDC_WAIT, "Uint")
      VarSetCapacity(CurrentCursorStruct, 20, 0)
      NumPut(20, CurrentCursorStruct)
      result := DllCall("GetCursorInfo", "str", CurrentCursorStruct)
      hCursor := NumGet(CurrentCursorStruct, 8)
      sTip :=
         sTip := "This should just take a sec..."
         sTip := "This may take some time.... probably lots..."
      ToolTip, %sTip%
      Sleep, 20

^!X::Gosub, EXIT


It was an interesting problem.
Hope it does what you're looking 4. :D

Ok, this is what I came up with - hope it's what you're looking for.
Open the VBA editor in Outlook (Alt F11), click the Insert menu & click Module & paste this code into the new module.
Then open the Immediate window (Ctrl G), type AddCustomCategoriesToolbar & hit Enter.

(You can also open the ThisOutlookSession object & run AddCustomCategoriesToolbar from the Application_Startup event.)

One more thing, you'll see the category added but in brackets the note (not in Master Category List)
The category is still associated with the email.
Outlook 2003 doesn't give programmatic access to the Master Category List, so if you wanna get rid of that side-note, add it yrself via the Categories dialog & you won't have any problems.
But as far as I can make out it's just cosmetic.

Code: Visual Basic [Select]
  1. Option Explicit
  3. Private Const MY_CUSTOM_TOOLBAR__ = "Virtua"
  4. Private Const MY_CUSTOM_CATEGORIES_BUTTON__ = "Set Categories"
  5. Private Const MY_CUSTOM_CATEGORIES__ = "1 - Client - sent to"
  8. Public Sub AddCustomCategoriesToolbar()
  9. On Error Resume Next
  10. Dim oNewCmdBar As CommandBar
  11. Dim oNewButton As CommandBarButton
  13.     '**first check if toolbar exists
  14.    Set oNewCmdBar = Application.ActiveExplorer.CommandBars.Item(MY_CUSTOM_TOOLBAR__)
  15.     '**otherwise create it
  16.    If (oNewCmdBar Is Nothing) Then
  17.         Set oNewCmdBar = Application.ActiveExplorer.CommandBars.Add(MY_CUSTOM_TOOLBAR__)
  18.     End If
  20.     '**first check if button exists
  21.    Set oNewButton = oNewCmdBar.Controls.Item(MY_CUSTOM_CATEGORIES_BUTTON__)
  22.     '**otherwise create it
  23.    If (oNewButton Is Nothing) Then
  24.         Set oNewButton = oNewCmdBar.Controls.Add(msoControlButton)
  25.     End If
  26.     '**set the caption & macro to run
  27.    oNewButton.Caption = MY_CUSTOM_CATEGORIES_BUTTON__
  28.     oNewButton.OnAction = "CustomActions_Categories"
  30.     '**by default they are created invisible
  31.    oNewButton.Visible = True
  32.     oNewCmdBar.Visible = True
  34. End Sub
  37. Private Sub CustomActions_Categories()
  38. On Error Resume Next
  39. Dim oItem As Object
  40. Dim oNewCmdBar As CommandBar
  41. Dim oNewButton As CommandBarButton
  43.     Set oNewCmdBar = Application.ActiveExplorer.CommandBars.Item(MY_CUSTOM_TOOLBAR__)
  44.     Set oNewButton = oNewCmdBar.Controls.Item(MY_CUSTOM_CATEGORIES_BUTTON__)
  46.     oNewButton.Caption = "Working..."
  47.     DoEvents
  49.     '**loop thru selected items
  50.    For Each oItem In ActiveExplorer.Selection
  51.         '**set their categories if they have the property
  52.        oItem.Categories = MY_CUSTOM_CATEGORIES__
  53.         '**save our change
  54.        If (Err = 0) Then
  55.             oItem.Save
  56.         End If
  58.     Next oItem
  60.     oNewButton.Caption = MY_CUSTOM_CATEGORIES_BUTTON__
  62. End Sub

Yes it's doable.
But I think AHK is the second choice in this case - but that's just going on yr post.
If you do this with AHK you'd basically be simulating user interaction & filling in the relevant dialogs.
That's fine but Office apps are notorious for undocumented features & the 1st I noticed was Outlook seemed to hang when I first entered a new Category & then worked fine. :tellme:

In any case, I think a better way for you to go is to use VBA in Outlook.
It's a simple matter to write a macro that will write the data to the Categories field of a MailItem.
Then create a custom toolbar & a button linked to the macro. Whenever you need to, just click the button & yr category is set!
You can even put a loop in the macro so that you can select multiple items & set the Category for all items at once.

It's actually just half a page of code so I'll post it for you in a little bit.

Pages: prev1 [2]