User Profile

Collapse

Profile Sidebar

Collapse
dittytwo
dittytwo
Last Activity: Jun 17 '08, 02:15 PM
Joined: Jan 9 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dittytwo
    started a topic Help ! Outlook Automation with outlook visible

    Help ! Outlook Automation with outlook visible

    hi there
    i have been tasked with automating a simple create email task using microsoft outlook.
    the code below works create unfortunately it works only at a system level i.e. the user does not see it.
    please help me make it visible
    [CODE=PYTHON]
    text="hello wolrd \nhello world this is hopefully a new paragrpah"
    subject="this is the E-mail"
    recipient="thin gy-ma-bob@hotmail.com "...
    See more | Go to post

  • dittytwo
    replied to Unable to use insert aftertext in word api
    DOH!
    ok simple really have to tell it to move the cursor to the end of the line before you can insert after..

    hence at line 45 insert the following
    Code:
    self.Word.ActiveDocument.Content.MoveEnd
    it works wonderfully

    I really should try everything before posting :D
    cheers
    D2
    See more | Go to post

    Leave a comment:


  • dittytwo
    started a topic Unable to use insert aftertext in word api

    Unable to use insert aftertext in word api

    Hi there
    The below code works if you don't try to do anything to the word document
    which is great (Not :D)
    I am having problems with the context command both text (i.e initial document with no text) or a subsequent addition of text, insert, to the document.
    as this is going to be used along side other com opened applications Excel power point etc. it needs to work in the self.X orientation as i can get it to work normally...
    See more | Go to post

  • dittytwo
    started a topic passing the return caharacter to word

    passing the return caharacter to word

    Howdy there
    I have the below code
    <code>
    import win32com.client ,pythoncom
    pythoncom.CoIni tializeEx(pytho ncom.COINIT_APA RTMENTTHREADED)
    wordapp = win32com.client .Dispatch("Word .Application") # Create new Word Object
    wordapp.Visible = 1 # Word Application should`t be visible
    worddoc = wordapp.Documen ts.Add() # Create new Document Object
    worddoc.Content .Text = "=rand(200,99)" +"/r"...
    See more | Go to post

  • dittytwo
    replied to How to shut-down Excel from Python
    total blonde moment
    com_objectName. SaveAs(Filename )

    oh dear...

    D2...
    See more | Go to post

    Leave a comment:


  • dittytwo
    replied to How to shut-down Excel from Python
    Hi there

    I want the opposite
    and i am having a blonde day

    i can't save it
    Excel.Saved = 1 obviously only works if you have opened the document
    however for the life of me today i can't figure out how to save it once i have created it as it pops up a save dialogue box

    cheers
    D2
    See more | Go to post

    Leave a comment:


  • Ok
    I solved my own problem with a little help from SC (cheers Si)
    worst thing is he doesn't even understand python... oh well here is the answer to get a process's CPU usage
    Code:
    import wmi,win32api,win32process
    c = wmi.WMI ()
    process_info = {}
      for p in c.Win32_PerfRawData_PerfProc_Process (name='firefox'):
        n1, d1 = long (p.PercentProcessorTime), long(p.Timestamp_Sys100NS)
        n0, d0
    ...
    See more | Go to post

    Leave a comment:


  • Hi all
    i have managed to fix the 50% thing
    bad coding had a while loop checking for the existence of something and no pause.. = loads of CPU resource.
    i still need the %cpu-usage for a process any help would be great
    See more | Go to post

    Leave a comment:


  • dittytwo
    replied to What is your OS and Python Version
    Hi
    I am on
    Windows XP, 2008,2003,2000 pro/ server
    using komodo to edit although can do it in notepad..
    have python version 2.5
    See more | Go to post

    Leave a comment:


  • Trying to find a simple way of getting a Process current CPU Usage

    Hi all
    I have been looking around the web
    and can't seem to find a solution the solution that i have found and manipulated seems to bring back the whole list of currently running process's which hogs a lot of CPU time in its self..

    basic idea of my program is i have multiple threads doing things and i have a thread that gathers data within this thread i can currently get all sorts of information using
    ...
    See more | Go to post
No activity results to display
Show More
Working...