Converting shaders from other programs?

I'm just getting started with Pixel bender, but I've played around with fairly simplified GLSL Shaders in Max/MSP and Quartz Composer before. I'm trying to convert this one shader for use in after effects, but I'm a bit stuck on converting some of the variable types and things like that. I'm also not sure if the effect is even possible to recreate in after effects because it requires a sort of feedback loop when I use it in Max/MSP. The effect basically creates video trails off of bright elements in the scene. Here is the code as it appears for the max/msp fragment shader. If anyone has some hints of whether it looks possible, let me know
uniform float slide_up;
uniform float slide_down;
varying vec2 texcoord0;
varying vec2 texcoord1;
uniform sampler2DRect tex0;
uniform sampler2DRect tex1;
void main(void)
    vec4 su, sd, up, down, amount;
    // sample inputs at texcoords
    vec4 input0 = texture2DRect(tex0, texcoord0);
    vec4 input1 = texture2DRect(tex1, texcoord1);
    // get contribution
    amount.x = input0.x > input1.x ? 1.0 : 0.0;
    amount.y = input0.y > input1.y ? 1.0 : 0.0;
    amount.z = input0.z > input1.z ? 1.0 : 0.0;
    amount.w = input0.w > input1.w ? 1.0 : 0.0;
    // calculate slide down
    float d = max(1.0, abs(slide_down));
    sd = vec4(1.0 / d);
    down = input1 + ((input0 - input1) * sd);
    // calculate slide up
    float u = max(1.0, abs(slide_up));
    su = vec4(1.0 / u);
    up = input1 + ((input0 - input1) * su);
    // mix between down and up
    gl_FragColor = mix(down, up, amount);

Actually I managed to convert the right areas, but now I gues my question is more about setting up a feedback loop in after effects so that the effect can accumulate. Is this a possibility or should I be doing it another way? This is the code that I ended up with:
    input image4 src;
    input image4 feedback;
    output pixel4 dst;
    parameter float slide_up;
    parameter float slide_down;
    void
    evaluatePixel()
        float4 su, sd, amount, up, down;
    // sample inputs at texcoords
    float4 input0 = sampleNearest(src, outCoord());
    float4 input1 = sampleNearest(feedback, outCoord());
    // get contribution
    amount.x = input0.x > input1.x ? 1.0 : 0.0;
    amount.y = input0.y > input1.y ? 1.0 : 0.0;
    amount.z = input0.z > input1.z ? 1.0 : 0.0;
    amount.w = input0.w > input1.w ? 1.0 : 0.0;
    // calculate slide down
    float d = max(1.0, abs(slide_down));
    sd = float4(1.0 / d);
    down = input1 + ((input0 - input1) * sd);
    // calculate slide up
    float u = max(1.0, abs(slide_up));
    su = float4(1.0 / u);
    up = input1 + ((input0 - input1) * su);
    // mix between down and up
        dst = mix(down, up, amount);

Similar Messages

  • Line Breaks missing in captions from other programs...

    I've spent the last few hours searching around, and I've been unable to find any solution to a weird thing I noticed.
    I've recently purchased LR 3.4.1 and when I imported a handful of older pics that had had the captions set using Bridge, the line breaks were now gone.
    I then went to Bridge and tested it, and sure enough, it can read line breaks from LR, but the opposite doesn't seem to be true. As part of my work, I get a bunch of photos that other photogs have shot and added captions to via Bridge, but I can't seem to find any check box or setting on how to get LR to read the line breaks.
    Any one have any advice on how to get LR to read line breaks from other programs? I'd hate to have to go through and re-caption each and every single photo, especially when adding the older ones into LR to use it as a DAM.
    Thanks!

    This is a long-standing, annoying bug in Windows LR that has been acknowledged by Adobe:
    http://feedback.photoshop.com/photoshop_family/topics/newline_bug_in_caption_text
    Please go to the feedback site and vote for that issue to get fixed.
    It is just a display problem in LR -- the line breaks in the metadata are preserved, and if you enter line breaks in the metadata, they are preserved too.

  • Firefox 3.6 doesn't open links clicked from other programs (IM, etc.,)

    Whenever I try to open a link from either my IM or an IRC program like mIRC it won't open in firefox. I have to copy and paste the link.

    I now have FireFox 32.0.2 no joy. I have loaded ThunderBrowse which took care of Thunderbird but still can't load links from other programs. I fixed this before (other backups, I crashed my windows C drive and have been trying to restore), but can't remember how. I think it required reloading IE (I had deleted IE on my latest restore), but I have now done that with no joy.
    When I click on a link from another program, nothing happens, and when I right click and am offered "open in browser" nothing happens, and when offered " copy browser link" it doesn't copy.
    I tried resetting FireFox, no joy.
    Noticed control panel "set program access" doesn't hold, always goes back to custom, and defaults to "uses default browser"!
    Please help!

  • Links from other programs won't open in Firefox

    This has been asked a number of times before, but none of the answers worked for me. I have Firefox 26.0 (the most stable for me) and Thunderbird 24.6.0. After a computer crash and reloading both programs, I first noticed the problem with links from Thunderbird, both clicking and right clicking with "open in browser". But then I remembered trying to open help in MS word and Frontpage which are supposed to open from the internet.
    I have checked that Firefox is the default browser, changed the file (none) file transfer protocol, then deleted it, etc. Nothing helps.

    I now have FireFox 32.0.2 no joy. I have loaded ThunderBrowse which took care of Thunderbird but still can't load links from other programs. I fixed this before (other backups, I crashed my windows C drive and have been trying to restore), but can't remember how. I think it required reloading IE (I had deleted IE on my latest restore), but I have now done that with no joy.
    When I click on a link from another program, nothing happens, and when I right click and am offered "open in browser" nothing happens, and when offered " copy browser link" it doesn't copy.
    I tried resetting FireFox, no joy.
    Noticed control panel "set program access" doesn't hold, always goes back to custom, and defaults to "uses default browser"!
    Please help!

  • HT5958 This new closed Library system stinks. Now you can't access media from other programs. Any work around?

    Let me start by saying I have been using FCP X for a year now and really love it.  We produce a half hour weekly TV series so I put it through its paces on a weekly bases.
    I was horrified to return from the holidays to find out that an automatic update yielded a whole new file system.  By packaging all of the Final Cut Event and Project folders into a single library file you can no longer access the original media from other programs such as Photoshop and After Effects without making two copies of all of the media.  This really cuts into the pipeline.  In the past we were able to recreate new show opens and transitions quickly from within After Effects by linking to the original media in the event folders to use them as source files in compositions.  The same was true of grabbing frames from Original movies for use in Photoshop for promotional materials.  With the use of the Libraries, ALL OF THE LINKS ARE BROKEN.  Yes I know you can right click on a library and still view the files, yes they are still there, but you can't do that from within another program. 
    This Library system doesn't make any sense.  Its a step back from the old system.  It was much easier, quicker, and efficient to move large event libraries and projects off and on the system and backup using Finder.  Now you have to open up Final Cut to do everything and its a lot slower.
    I want to appeal to any Apple developers who monitor this to return to the old system of file management. 

    Media does not have to be stored inside the library. Use the Consolidate library or event to move it to an external location.

  • I can't print in Adobe 11.0, I can print from other programs?

    I have confirmed that I can print from other programs.
    I have uninstalled Adobe and reinstalled to make sure the programs was the most up todate.
    I have installed a new printer just today and confirmed the drivers are up todate.
    I have confirmed there are no security issues with the document - documents.
    I have tried printing the document as an image and it still will not print.
    I don't get any errors, just nothing happens.  It doesn't even go into the print que
    Help!

    I tried printing a simple PDF.
    We couldn't print PDF's prior to the replacment of the printer, but I thought replacing the printer might help.
    I have pulled some tech people here at the office to see if there is a common denominator between the computers and or the issues arising and nothing is coming up.
    This is just so odd.

  • I can't paste text from other programs

    For some strange reason, PE12 wont let me past text from other programs and Idk why?!

    What happens when you try? Any error message?

  • Can I share files from other programs or just Adobe apps files. I work with Final Cut and Premiere X

    Can I share files from other programs or just Adobe apps files. I work with Final Cut and Premiere X.? Need to share files up to 6GB.
    I need to know if the 20 gb limit is about all that I share, or if it's just about whatis in the clouds. If I take, recover my limit?
    The speed of upload e download is good?

    The Creative Cloud file storage could be used for video assets but speed and performance might vary based on location. I would suggest you testing it out yourself using your Adobe ID before subscribing. Performance would not change after you joined.
    -Dave

  • Outlook 2010 paste from other programs not working.

    Hi,
    Win 7 SP1 x86 w latest patches. Win lang. ENG
    Outlook 2010 SP1 x86 w latest patches. Office lang. ENG
    Regional (date/time and so on) settings EE (Estonia)
    I have about 6 users with same conditions.
    When I'm trying to copy - paste from other programs like IE9, Word, Excel I'm unable to paste into Outlook message body.
    It just wont paste.
    Typically, Outlook shows me "thniking circle" for a millisecond or rarely just hangs.
    There are some exceptions:
    1. I'm able to paste into To: field
    2. I'm able to paste into Subject: field
    3. I'm able to paste even into body if I copied text from Notepad.
    4. I'm able to paste into body when I copied text from another email.
    Additional information:
    Outlook default message format "Plain text" (Rich text, HTML - does'nt matter)
    What I'v tried so far and results:
    1. Repair Office installation trough "Programs and features" - NO LUCK
    2. Changed default paste behaviour from other programs to "keep text only" - NO LUCK
    3. Used SAFE MODE - this helps, paste SEEMS WORKING correctly. Based on my knowledge, SAFE mode mainly disables Add-ins. OK.
    Disabled all Add-ins in normal mode so Outlook shows that "No Active Application Add-Ins" - NO LUCK
    So, I'm out of ideas. I think that this problem starts after installing Office 2010 SP1
    I don't want to uninstall SP1 because for me it's not a solution (SP1 won't dissapear from the list of updates), ok.. agree, it may be
    temporary solution but at the end of the day, there must be something else.
    Any ideas?
    rgds Sven

    Rename normailemail.dotm to .old when Outlook is closed and see if it works now.
    You can find the file here;
    C:\Users\%username%\AppData\Roaming\Microsoft\Templates
    Robert Sparnaaij
    [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info
    Thanx, NormalEmail.dotm did not do anything for me but the renaming the Normal.dotm in the same folder did the trick for me. I can paste links again into outlook :)
    Win7 SP1 and Outlook 2010 32bit

  • How open images from other programs & convert to tiff?

    I am new to digital photography. I usually take 2 to 3 MB images with my Canon Rebel XT and use iPhoto as my basic program to organize images, create albums, and do very basic editing. I'm running on a G4 Powerbook with OS10.3. I expect to upgrade to iPhoto6 soon. I also use Canon's Image Browser (because it does a better job of compression for emailing that my present iPhoto) and an abbreviated version of ArcSoft PhotoStudio which came bundled with my Canon and has editing tools similar to Adobe Photoshop Elements.
    So far I usually use iPhoto's "Preferences/Open in Other" command when I want to open one or more selected images in one of the other programs. I have not found any easy way to locate an image while working in ImageBrowser or PhotoStudio, because iPhoto assigns folder numbers by date, so I'd have to know in which of many numbered folders to look. Placing images into iPhoto albums does not help because while the album names appear in these program's tree view they appear unable to link to them. Canon refuses to answer questions relating to iPhoto and referred me to ArcSoft for any questions about PhotoStudio. ArcSoft says they provide no support for programs bundled with hardware. Typical. What I'd like to know is:
    1. Is there any easy way to locate iPhoto images while I'm in one of these other programs?
    2. Is there any way to copy an entire album from iPhoto to one of these other programs?
    3. I've attended two different digital photo classes in which instructors felt it desirable to convert jpegs to tiffs. One felt it was necessary to reduce the loss of pixels during editing, and the other does it for any image he plans to print, claiming it improves print quality. They recommended getting a special conversion program. Based on responses here to the topic: "Want to save jpeg file as tiff before making edits to photos", others feel that for most amateurs like me this is a minor issue, especially with iPhoto. Testing this I have found, as Kevin Wolfe1 says Feb 12, that compression of a jpeg appears to occur primarily on the first edit and does not sognificantly degrade the image. The programs I mention above appear able to save an edited jpeg as a tiff if desired, but I've noticed also that iPhoto's Export command includes the option to export a jpeg (to desktop or another folder) as a tiff. When I tried this, it did create a file identified as .tif, and I can drag that file back into the iPhoto Library where it remains named as a .tif, and according to iPhoto, this file contains about 5 times the MBs the original jpeg had. What I'm curious to know is, is that a true tiff file or is iPhoto kidding me?
    Powerbook G4   Mac OS X (10.3.9)  

    Typical. What I'd like to know is:
    1. Is there any easy way to locate iPhoto images
    while I'm in one of these other programs?
    In iPhoto 06 you have the option to NOT move imported image file in to the iPhoto library. So they images stay in the place where you put them. With this option the iPhoto library only contains "pointers".
    2. Is there any way to copy an entire album from
    iPhoto to one of these other programs?
    Can't you open an album, select all the images then then use "export"
    3. I've attended two different digital photo classes
    in which instructors felt it desirable to convert
    jpegs to tiffs.
    If you are worried about this then you should be shooting RAW format. In your case the camera is doing the JPG conversion and the "damage" is unrecoverable.
    iPhoto 6 and Tigeer (10.4.x) has a little bit better supportfor raw format images i yu are worried about something that makes such a small difference then you should be woried about the stuf that makes a large difference first.
    You might want to concider this workflow:
    1) use Canon software to download files from camera
    2) use Canon software to convert to TIFF
    3) Import TIFF to iPhoto (using option to NOT consolidate library
    4) specify arcedit, PS or Gimp as your external editor
    Others might want to lt iPhoto do the import and raw conversion but you said you wanted thr photos to be stored outside of iPhoto's library system you you can find them with out having to do an export.

  • Opening pictures in iPhoto from other programs

    I'm wanting to use pictures from my iPhoto library in other programs-- i.e. Photoshop Elements or to upload to a website. When working from Photoshop Elements, when I go to File>Open>Pictures>iPhotoLibrary I get an error message. The only way I seem to be able to USE any of my photos stored in iPhoto is if I copy them to my "pictures" folder in the Finder and then use them. Of course, this means I am using double the space on my hard drive. There must be an easier way. What am I doing wrong?

    So if I use Photoshop as an external editor, the Save function is only saving a copy? Does the copy go back into the original event this way?
    When you set Photoshop (or an Image Editor) as an external and then go to edit the pic here's what happens:
    1. iPhoto makes a copy of the file and sends the copy to Photoshop
    2. Make your edits
    3. Save.
    4. The Edited version is returned to iPhoto and saved in the Modified Folder.
    5. A new thumbnail is made and replaces the thumbnail in the iPhoto Window
    Thereafter if you want to get to the Original you have several options:
    a: Photos -> Revert to Original - this destroys the modified version
    b: Export using the File -> Export command, set the *Kind: Original*
    c. Any other form of export yields the edited version.
    In Windows if one chooses save when editing in Photoshop, the original is overwritten,
    This is true in Photoshop on the Mac too, the difference is you're using iPhoto, and it's +iPhoto making the copy+. Hence the 'Save As' to preserve your original is unnecessary.
    which i can't seem to access in Finder browse mode or from iPhoto
    There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 and later*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and later* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and later:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    Regards
    TD

  • Pulling data from other programs...

    Howdy, I have a bit of a question...
    in order for a program i'm building to work without a lot of excess calculations, I need to pull a number from another program, its in a field at the top of the screen something like this:
    |$12345678|
    ---------Is java capable of pulling that number? if so, how would i go about it?

    Howdy, I have a bit of a question...
    in order for a program i'm building to work without a
    lot of excess calculations, I need to pull a number
    from another program, its in a field at the top of the
    screen something like this:
    |$12345678|
    ---------Is java capable of pulling that number? if so, how
    would i go about it?Sorry, you are probably out of luck unless you want to jump into using native code

  • Capturing keystrokes from other programs

    Hi,
    I'm looking for away to to capture mouse and keyboard events from programs other than my java program. I want my program to log and analyse mouse and keyboard events from any program that is open in windows. I'm designing a user interface analyser. Can anyone help?
    Cheers!
    Jacques

    Thanks for all your input, but I am sadly no closer to
    an answer :-( It looks like its going to have to be VB
    unless someone can save my life and help me out in
    Java. Please keep posting and hopefully someone might
    give me that elusive solution.VB won't do this either. What you are asking about is injecting a system wide hook into the operating system. I can pretty much guarantee that this will not be possible without resorting to native code.
    If you are on a Win32 box, the system hook you are looking for is (duh) the keyboard hook. To get it to work across processes, you have to prepare a DLL that contains the hook procedure, then register the hook procedure (and the DLL hmodule) with the Windows hooking system. After that, every time an application is loaded, Windows will also load your DLL, and will forward key press events through your hook procedure.
    Setting global hooks like this is a tricky business, and I wouldn't recommend it as a first program.
    You can do a Google search on "Windows Global Keyboard Hook" and find info on how to do this. If you want to do it using only Java, then you are out of luck.
    - K

  • Obtaining values from other programs

    I seen where you can use Spy ++ to get values from other running programs, how do you do it? I found the values un Spy ++ from the window, so where from I go from here?
    Regards, Carter Humphreys

    Here's some more.
    Option Strict On
    Imports System.Collections.Generic
    Imports System.Runtime.InteropServices
    Imports System.Text
    Public Class Form1
    <DllImport("User32.dll")> _
    Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
    End Function
    Private Declare Auto Function IsIconic Lib "user32.dll" (ByVal hwnd As IntPtr) As Boolean
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    ListView1.AllowColumnReorder = True
    ListView1.GridLines = True
    ListView1.View = View.Details
    ListView1.Sorting = SortOrder.Ascending
    ListView1.Columns.Add("Main Window Title", 150, HorizontalAlignment.Left)
    ListView1.Columns.Add("Child Class Name", 300, HorizontalAlignment.Left)
    ListView1.Columns.Add("Child hWnd", 100, HorizontalAlignment.Left)
    ListView1.Columns.Add("Child Main Window Title", 300, HorizontalAlignment.Left)
    ListView1.Columns.Add("Is Application Minimized", 300, HorizontalAlignment.Left)
    Timer1.Interval = 5000
    End Sub
    Private Sub ListView1_Click(sender As Object, e As EventArgs) Handles ListView1.Click
    TextBox1.Text = ""
    TextBox1.Text = "Main Window Title = " & ListView1.FocusedItem.SubItems.Item(0).Text.ToString & vbCrLf & _
    "Child Class Name = " & ListView1.FocusedItem.SubItems.Item(1).Text.ToString & vbCrLf & _
    "Child hWnd = " & ListView1.FocusedItem.SubItems.Item(2).Text.ToString & vbCrLf & _
    "Child Main Window Title = " & ListView1.FocusedItem.SubItems.Item(3).Text.ToString & vbCrLf & _
    "Is Application Minimized = " & ListView1.FocusedItem.SubItems.Item(4).Text.ToString
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    ListView1.Items.Clear()
    Dim enumerator As New WindowsEnumerator()
    For Each top As ApiWindow In enumerator.GetTopLevelWindows()
    For Each child As ApiWindow In enumerator.GetChildWindows(top.hWnd)
    Dim item1 As New ListViewItem(top.MainWindowTitle)
    item1.SubItems.Add(child.ClassName)
    item1.SubItems.Add(child.hWnd.ToString)
    item1.SubItems.Add(child.MainWindowTitle)
    If top.MainWindowTitle.Length > 0 Then
    Dim ICONIC As IntPtr = CType(CInt(FindWindow(Nothing, top.MainWindowTitle).ToString), IntPtr)
    item1.SubItems.Add(IsIconic(ICONIC).ToString)
    End If
    ListView1.Items.AddRange(New ListViewItem() {item1})
    Next child
    Next top
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Timer1.Start()
    Using OFD As New OpenFileDialog
    If OFD.ShowDialog = DialogResult.OK Then
    End If
    End Using
    End Sub
    Dim InfoToWrite As New List(Of String)
    Dim CountIt As Integer = 1
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
    InfoToWrite.Clear()
    Timer1.Stop()
    ListView1.Items.Clear()
    Dim enumerator As New WindowsEnumerator()
    For Each top As ApiWindow In enumerator.GetTopLevelWindows()
    For Each child As ApiWindow In enumerator.GetChildWindows(top.hWnd)
    InfoToWrite.Add(top.MainWindowTitle & " - " & child.ClassName & " - " & child.hWnd.ToString & " - " & child.MainWindowTitle)
    Dim item1 As New ListViewItem(top.MainWindowTitle)
    item1.SubItems.Add(child.ClassName)
    item1.SubItems.Add(child.hWnd.ToString)
    item1.SubItems.Add(child.MainWindowTitle)
    If top.MainWindowTitle.Length > 0 Then
    Dim ICONIC As IntPtr = CType(CInt(FindWindow(Nothing, top.MainWindowTitle).ToString), IntPtr)
    item1.SubItems.Add(IsIconic(ICONIC).ToString)
    End If
    ListView1.Items.AddRange(New ListViewItem() {item1})
    Next child
    Next top
    IO.File.WriteAllLines("C:\Users\John\Desktop\Some Info " & CountIt.ToString & ".Txt", InfoToWrite.ToArray)
    CountIt += 1
    End Sub
    End Class
    Public Class ApiWindow
    Public MainWindowTitle As String = ""
    Public ClassName As String = ""
    Public hWnd As Int32
    End Class
    ''' <summary>
    ''' Enumerate top-level and child windows
    ''' </summary>
    ''' <example>
    ''' Dim enumerator As New WindowsEnumerator()
    ''' For Each top As ApiWindow in enumerator.GetTopLevelWindows()
    ''' Console.WriteLine(top.MainWindowTitle)
    ''' For Each child As ApiWindow child in enumerator.GetChildWindows(top.hWnd)
    ''' Console.WriteLine(" " + child.MainWindowTitle)
    ''' Next child
    ''' Next top
    ''' </example>
    Public Class WindowsEnumerator
    Private Delegate Function EnumCallBackDelegate(ByVal hwnd As Integer, ByVal lParam As Integer) As Integer
    ' Top-level windows.
    Private Declare Function EnumWindows Lib "user32" _
    (ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer
    ' Child windows.
    Private Declare Function EnumChildWindows Lib "user32" _
    (ByVal hWndParent As Integer, ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer
    ' Get the window class.
    Private Declare Function GetClassName _
    Lib "user32" Alias "GetClassNameA" _
    (ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer
    ' Test if the window is visible--only get visible ones.
    Private Declare Function IsWindowVisible Lib "user32" _
    (ByVal hwnd As Integer) As Integer
    ' Test if the window's parent--only get the one's without parents.
    Private Declare Function GetParent Lib "user32" _
    (ByVal hwnd As Integer) As Integer
    ' Get window text length signature.
    Private Declare Function SendMessage _
    Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
    ' Get window text signature.
    Private Declare Function SendMessage _
    Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As StringBuilder) As Int32
    Private _listChildren As New List(Of ApiWindow)
    Private _listTopLevel As New List(Of ApiWindow)
    Private _topLevelClass As String = ""
    Private _childClass As String = ""
    ''' <summary>
    ''' Get all top-level window information
    ''' </summary>
    ''' <returns>List of window information objects</returns>
    Public Overloads Function GetTopLevelWindows() As List(Of ApiWindow)
    EnumWindows(AddressOf EnumWindowProc, &H0)
    Return _listTopLevel
    End Function
    Public Overloads Function GetTopLevelWindows(ByVal className As String) As List(Of ApiWindow)
    _topLevelClass = className
    Return Me.GetTopLevelWindows()
    End Function
    ''' <summary>
    ''' Get all child windows for the specific windows handle (hwnd).
    ''' </summary>
    ''' <returns>List of child windows for parent window</returns>
    Public Overloads Function GetChildWindows(ByVal hwnd As Int32) As List(Of ApiWindow)
    ' Clear the window list.
    _listChildren = New List(Of ApiWindow)
    ' Start the enumeration process.
    EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0)
    ' Return the children list when the process is completed.
    Return _listChildren
    End Function
    Public Overloads Function GetChildWindows(ByVal hwnd As Int32, ByVal childClass As String) As List(Of ApiWindow)
    ' Set the search
    _childClass = childClass
    Return Me.GetChildWindows(hwnd)
    End Function
    ''' <summary>
    ''' Callback function that does the work of enumerating top-level windows.
    ''' </summary>
    ''' <param name="hwnd">Discovered Window handle</param>
    ''' <returns>1=keep going, 0=stop</returns>
    Private Function EnumWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32
    ' Eliminate windows that are not top-level.
    If GetParent(hwnd) = 0 AndAlso CBool(IsWindowVisible(hwnd)) Then
    ' Get the window title / class name.
    Dim window As ApiWindow = GetWindowIdentification(hwnd)
    ' Match the class name if searching for a specific window class.
    If _topLevelClass.Length = 0 OrElse window.ClassName.ToLower() = _topLevelClass.ToLower() Then
    _listTopLevel.Add(window)
    End If
    End If
    ' To continue enumeration, return True (1), and to stop enumeration
    ' return False (0).
    ' When 1 is returned, enumeration continues until there are no
    ' more windows left.
    Return 1
    End Function
    ''' <summary>
    ''' Callback function that does the work of enumerating child windows.
    ''' </summary>
    ''' <param name="hwnd">Discovered Window handle</param>
    ''' <returns>1=keep going, 0=stop</returns>
    Private Function EnumChildWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32
    Dim window As ApiWindow = GetWindowIdentification(hwnd)
    ' Attempt to match the child class, if one was specified, otherwise
    ' enumerate all the child windows.
    If _childClass.Length = 0 OrElse window.ClassName.ToLower() = _childClass.ToLower() Then
    _listChildren.Add(window)
    End If
    Return 1
    End Function
    ''' <summary>
    ''' Build the ApiWindow object to hold information about the Window object.
    ''' </summary>
    Private Function GetWindowIdentification(ByVal hwnd As Integer) As ApiWindow
    Const WM_GETTEXT As Int32 = &HD
    Const WM_GETTEXTLENGTH As Int32 = &HE
    Dim window As New ApiWindow()
    Dim title As New StringBuilder()
    ' Get the size of the string required to hold the window title.
    Dim size As Int32 = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0)
    ' If the return is 0, there is no title.
    If size > 0 Then
    title = New StringBuilder(size + 1)
    SendMessage(hwnd, WM_GETTEXT, title.Capacity, title)
    End If
    ' Get the class name for the window.
    Dim classBuilder As New StringBuilder(64)
    GetClassName(hwnd, classBuilder, 64)
    ' Set the properties for the ApiWindow object.
    window.ClassName = classBuilder.ToString()
    window.MainWindowTitle = title.ToString()
    window.hWnd = hwnd
    Return window
    End Function
    End Class
    La vida loca

  • Adobe will not open PDF files from other programs

    This is on one of the computers in our office.  We use a medical records program called Sevocity.  This program stores documents that we import into the electronic charts as PDF files.  When we upgraded that computer from Adobe to Adobe Pro, it no longer opened the PDF documents stored there.  Is this an issue with the medical program or with Adobe Pro?  We already had Sevocity Support attempt to fix the problem, but they said the issue looked like it was with Adobe.
    We would like to troubleshoot by re-installing AdobePro, but we want to make sure that none of our files stored to the Adobe Document Cloud.  If we re-install Adobe, will those documents still be available in the online Adobe account's Document Cloud, or do we need to move those documents to the collective Creative Cloud?

    Yeah, it does open from other sources like "My Documents", but sometimes it won't open the print previews in our billing system either.  Communication error with secure sites and programs, maybe?  I don't get an error message, though.  It just displays the "processing" symbol next to the mouse for a second or two like it does when PDF's usually open, and then nothing happens.  We are using Windows 7 on that computer.  The other computer that runs on Windows 7 also has Adobe Pro XI, but does not experience these problems.  I have also put in a ticket with Sevocity (the program that is not communicating with Adobe). 
    And that's a relief about the Document Cloud!  We will try to re-install just in case it was something that went wrong with the initial install.

Maybe you are looking for

  • Apache 2.4 mod_perl libapreq problems

    I recently upgraded to Apache 2.4. This is now the bane of my existence. I run several servers with mod_perl and perl-libapreq. I cannot figure out how to these modules to work with Apache 2.4. I get the error: httpd: Syntax error on line 39 of /etc/

  • Is the non-multi-room DVR also 500 hours?

    My ReplayTV just died and I am thinking of upgrading to a FiOS DVR. We currently have a multi-room DVR that my daughter uses and I don't want to share it with her (and vice versa) plus it's the old 80 hour model. It seems like I can only get one mult

  • Licensing of this product has stop working (since uninstall using your uninstaller)

    Since couple of months ago (May be june or July)  i have notifications below when i want to use Adobe Premiere Pro cs4 "Licensing of this product has stop working, This product has has encounter problem which requeire that you restart your computer b

  • TextEdit doesn't show, but starts?

    All of a sudden, Text Edit will not work/start. I upgraded an Adobe application, but that's never affected other apps before. When I d-click a txt file or try to open the app, TextEdit opens but there is no window. If I try File-New, a little close i

  • Update Delivery qty via user exits

    Hello all, I need to replace the delivery qty that is copied from sales order with another qty during delivery creation (or) at the time of saving the delivery. I have tried replacing the field LIPS-LFIMG in various user exits. But none had updated t