Sign in to follow this  
Followers 0

AutoIT & Phidgets, Robotics with AutoIT (How To)

1 post in this topic

I am planning on building a "How To - AutoIT & Phidgets" and am looking for direction on how to document it.

Phidgets are "Products for USB Sensing and Control" that can be utilized with AutoIT. They allow physical

interface, functions and events / input and output through COM in the case of AutoIT. Check out the

Phidgets page for more information, and go to Trossen Robotics if you are going to buy (Cheaper and Faster).

The image is a link to the video right after I was able to get

AutoIT and the 1063 Bipolar stepper controllers talking. I

am building a 3-Axis CNC mill.

Posted Image

I Know AutoIT and Phidgets are not the ideal way to go when

building a mill... its a learning experience.

Quick piece together of code used in video above.

#include <GUIConstantsEx.au3>
GUICreate("PhidgetStepper Control Test",500,400)$Add_2C_B = GUICtrlCreateButton("Add to Current Position (+10000 1/16)", 5, 5, 490, 30)
$Sub_FC_B = GUICtrlCreateButton("Subtract from Current Position (-10000 1/16)", 5, 40, 490, 30)
$Output_E = GUICtrlCreateEdit("", 5, 335, 490, 60)GUISetState(@SW_SHOW)
;create the phidget object
$oPhidget = ObjCreate("phidget21COM.PhidgetStepper");open the Phidget system
If NOT $oPhidget.IsAttached Then
MsgBox(0, "Error", "Phidget Device not attached")
;register Phidget events
$oPhidEvents = ObjEvent($oPhidget, "phid1_");Power Stepper Motor, index motor 0
$oPhidget.Engaged(0) = 1
;set Stepper control values
$oPhidget.CurrentLimit(0) = 00.70
$oPhidget.VelocityLimit(0) = 7000.00
$oPhidget.Acceleration(0) = 18100.00;set the current position
$oPhidget.CurrentPosition(0) = 0
;read current position to variable
$Current_P = $oPhidget.CurrentPosition(0)GUICtrlSetData($Output_E, $Current_P)
While 1
$msg = GUIGetMsg()Select
Case $msg = $GUI_EVENT_CLOSE
MsgBox(0,"Application Alert", "Application Closing")
ExitLoopCase $msg = $Add_2C_B
$Current_P = $oPhidget.CurrentPosition(0)
$oPhidget.TargetPosition(0) = $Current_P +10000
GUICtrlSetData($Output_E, $Current_P)
Case $msg = $Sub_FC_B
$Current_P = $oPhidget.CurrentPosition(0)
$oPhidget.TargetPosition(0) = $Current_P -10000
GUICtrlSetData($Output_E, $Current_P)
WEnd;power off stepper at index 0
$oPhidget.Engaged(0) = 0
$oPhidget.Close();Phidget Event Handlers
Func phid1_OnDetach($Index, $IRValue)
MsgBox(0,"Error", "Phidget detached")

Sorry its one blob, it keeps coming out like that.

So where should I start a thread or threads, examples or questions, as it will be both and more.

I have a few different Phidgets and will be progressing the capabilities and limitations with the

help of the forum.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • timmalos
      By timmalos
      Hey all.
      I'm a little stuck starting with COM interfacing with Microsoft OneNote.
      The msdn doc is there :
      I found, with the OleViewer what I need to access :
      // Generated .IDL file (by the OLE/COM Object Viewer) // // typelib filename: 3 [ uuid(0EA692EE-BB50-4E3C-AEF0-356D91732725), version(1.1), helpstring("Microsoft OneNote 15.0 Object Library"), custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 134218339), custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 2147483647), custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, Created by MIDL version 8.00.0611 at Mon Jan 18 19:14:07 2038 ), custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, Microsoft.Office.Interop.OneNote.dll) ] library OneNote { // TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046} importlib("stdole2.tlb"); // Forward declare all types defined in this typelib interface IQuickFilingDialog; interface IQuickFilingDialogCallback; interface IApplication; interface Windows; interface Window; dispinterface IOneNoteEvents; typedef [uuid(552E0E02-B287-4EC6-9CC0-4BA019EE5EA1)] enum { hsSelf = 0, hsChildren = 1, hsNotebooks = 2, hsSections = 3, hsPages = 4 } HierarchyScope; typedef [uuid(41C8F6EA-0AF0-4A4F-99E9-5EB01EBFC9A3)] enum { heNone = 0, heNotebooks = 1, heSectionGroups = 2, heSections = 4, hePages = 8 } HierarchyElement; typedef [uuid(4DB67B4F-CC7D-45B5-88FE-569AE5798FF2)] enum { rrtNone = 0, rrtFiling = 1, rrtSearch = 2, rrtLinks = 3 } RecentResultType; typedef [uuid(B5EB9D34-5278-4D8A-AE1F-2F88EA56BBCE)] enum { cftNone = 0, cftNotebook = 1, cftFolder = 2, cftSection = 3 } CreateFileType; typedef [uuid(D6E78E55-7EE7-4A31-BF3E-B01E819599BA)] enum { piBasic = 0, piBinaryData = 1, piSelection = 2, piFileType = 4, piBinaryDataSelection = 3, piBinaryDataFileType = 5, piSelectionFileType = 6, piAll = 7 } PageInfo; typedef [uuid(D6166973-3665-4EDB-94B0-77C65C34B51C)] enum { pfOneNote = 0, pfOneNotePackage = 1, pfMHTML = 2, pfPDF = 3, pfXPS = 4, pfWord = 5, pfEMF = 6, pfHTML = 7, pfOneNote2007 = 8 } PublishFormat; typedef [uuid(E195F3E3-8EC3-4A67-81FE-DDBEC2B42D3F)] enum { slBackUpFolder = 0, slUnfiledNotesSection = 1, slDefaultNotebookFolder = 2 } SpecialLocation; typedef [uuid(452D048E-7F61-4258-94B9-A39E19C290DA)] enum { flEMail = 0, flContacts = 1, flTasks = 2, flMeetings = 3, flWebContent = 4, flPrintOuts = 5 } FilingLocation; typedef [uuid(82FC5A95-FEB7-4242-95E1-369C5DFE3F49)] enum { fltNamedSectionNewPage = 0, fltCurrentSectionNewPage = 1, fltCurrentPage = 2, fltNamedPage = 4 } FilingLocationType; typedef [uuid(226CC8E6-1ED0-4770-A7F1-A80BB4DDF07B)] enum { npsDefault = 0, npsBlankPageWithTitle = 1, npsBlankPageNoTitle = 2 } NewPageStyle; typedef [uuid(B67BC7E1-91B9-4F50-8471-77C76F8D63D6)] enum { dlDefault = 0xffffffff, dlNone = 0, dlLeft = 1, dlRight = 2, dlTop = 3, dlBottom = 4 } DockLocation; typedef [uuid(68555133-B62F-4490-9D66-9E9BFC68F6C6)] enum { xs2007 = 0, xs2010 = 1, xs2013 = 2, xsCurrent = 2 } XMLSchema; typedef [uuid(1ECC88B3-6D2B-4EDD-8DD5-BB11E5D34C09)] enum { tcsExpanded = 0, tcsCollapsed = 1 } TreeCollapsedStateType; typedef [uuid(13F18B04-E76F-42E0-97E6-8B6ABF38B484)] enum { nfoLocal = 1, nfoNetwork = 2, nfoWeb = 4, nfoNoWacUrl = 8 } NotebookFilterOutType; [ odl, uuid(1D12BD3F-89B6-4077-AA2C-C9DC2BCA42F9), helpstring("IQuickFilingUI Interface"), dual, oleautomation ] interface IQuickFilingDialog : IDispatch { [id(00000000), propget] HRESULT Title([out, retval] BSTR* bstrTitle); [id(00000000), propput] HRESULT Title([in] BSTR bstrTitle); [id(0x00000001), propget] HRESULT Description([out, retval] BSTR* bstrDescription); [id(0x00000001), propput] HRESULT Description([in] BSTR bstrDescription); [id(0x00000002), propget] HRESULT CheckboxText([out, retval] BSTR* bstrText); [id(0x00000002), propput] HRESULT CheckboxText([in] BSTR bstrText); [id(0x00000003), propget] HRESULT CheckboxState([out, retval] VARIANT_BOOL* pfChecked); [id(0x00000003), propput] HRESULT CheckboxState([in] VARIANT_BOOL pfChecked); [id(0x00000004), propget] HRESULT WindowHandle([out, retval] uint64* pHWNDWindow); [id(0x00000005), propget] HRESULT TreeDepth([out, retval] HierarchyElement* pTreeDepth); [id(0x00000005), propput] HRESULT TreeDepth([in] HierarchyElement pTreeDepth); [id(0x00000006), propget] HRESULT ParentWindowHandle([out, retval] uint64* pHWNDParentWindow); [id(0x00000006), propput] HRESULT ParentWindowHandle([in] uint64 pHWNDParentWindow); [id(0x00000007), propget] HRESULT Position([out, retval] tagPOINT* pPoint); [id(0x00000007), propput] HRESULT Position([in] tagPOINT pPoint); [id(0x00000008)] HRESULT SetRecentResults( [in] RecentResultType recentResults, [in] VARIANT_BOOL fShowCurrentSection, [in] VARIANT_BOOL fShowCurrentPage, [in] VARIANT_BOOL fShowUnfiledNotes); [id(0x0000000a)] HRESULT AddButton( [in] BSTR bstrText, [in] HierarchyElement allowedElements, [in] HierarchyElement allowedReadOnlyElements, [in] VARIANT_BOOL fDefault); [id(0x0000000b)] HRESULT Run([in] IQuickFilingDialogCallback* piCallback); [id(0x0000000c), propget] HRESULT SelectedItem([out, retval] BSTR* pbstrSelectedNodeID); [id(0x0000000d), propget] HRESULT PressedButton([out, retval] unsigned long* pButtonIndex); [id(0x0000000e), propput] HRESULT TreeCollapsedState([in] TreeCollapsedStateType rhs); [id(0x0000000f), propput] HRESULT NotebookFilterOut([in] NotebookFilterOutType rhs); [id(0x00000010)] HRESULT ShowCreateNewNotebook(); [id(0x00000011)] HRESULT AddInitialEditor(BSTR initialEditor); [id(0x00000012)] HRESULT ClearInitialEditors(); [id(0x00000013)] HRESULT ShowSharingHyperlink(); }; typedef struct tagtagPOINT { long x; long y; } tagPOINT; [ odl, uuid(627EA7B4-95B5-4980-84C1-9D20DA4460B1), helpstring("IQuickFilingDialogCallback Interface"), dual, oleautomation ] interface IQuickFilingDialogCallback : IDispatch { [id(0x60020000)] HRESULT OnDialogClosed([in] IQuickFilingDialog* dialog); }; [ odl, uuid(452AC71A-B655-4967-A208-A4CC39DD7949), helpstring("IApplication Interface"), dual, oleautomation ] interface IApplication : IDispatch { [id(0x60020000)] HRESULT GetHierarchy( [in] BSTR bstrStartNodeID, [in] HierarchyScope hsScope, [out] BSTR* pbstrHierarchyXmlOut, [in, optional, defaultvalue(2)] XMLSchema xsSchema); [id(0x60020001)] HRESULT UpdateHierarchy( [in] BSTR bstrChangesXmlIn, [in, optional, defaultvalue(2)] XMLSchema xsSchema); [id(0x60020002)] HRESULT OpenHierarchy( [in] BSTR bstrPath, [in] BSTR bstrRelativeToObjectID, [out] BSTR* pbstrObjectID, [in, optional, defaultvalue(0)] CreateFileType cftIfNotExist); [id(0x60020003)] HRESULT DeleteHierarchy( [in] BSTR bstrObjectID, [in, optional, defaultvalue(00:00:00)] DATE dateExpectedLastModified, [in, optional, defaultvalue(0)] VARIANT_BOOL deletePermanently); [id(0x60020004)] HRESULT CreateNewPage( [in] BSTR bstrSectionID, [out] BSTR* pbstrPageID, [in, optional, defaultvalue(0)] NewPageStyle npsNewPageStyle); [id(0x60020005)] HRESULT CloseNotebook( [in] BSTR bstrNotebookID, [in, optional, defaultvalue(0)] VARIANT_BOOL force); [id(0x60020006)] HRESULT GetHierarchyParent( [in] BSTR bstrObjectID, [out] BSTR* pbstrParentID); [id(0x60020007)] HRESULT GetPageContent( [in] BSTR bstrPageID, [out] BSTR* pbstrPageXmlOut, [in, optional, defaultvalue(0)] PageInfo pageInfoToExport, [in, optional, defaultvalue(2)] XMLSchema xsSchema); [id(0x60020008)] HRESULT UpdatePageContent( [in] BSTR bstrPageChangesXmlIn, [in, optional, defaultvalue(00:00:00)] DATE dateExpectedLastModified, [in, optional, defaultvalue(2)] XMLSchema xsSchema, [in, optional, defaultvalue(0)] VARIANT_BOOL force); [id(0x60020009)] HRESULT GetBinaryPageContent( [in] BSTR bstrPageID, [in] BSTR bstrCallbackID, [out] BSTR* pbstrBinaryObjectB64Out); [id(0x6002000a)] HRESULT DeletePageContent( [in] BSTR bstrPageID, [in] BSTR bstrObjectID, [in, optional, defaultvalue(00:00:00)] DATE dateExpectedLastModified, [in, optional, defaultvalue(0)] VARIANT_BOOL force); [id(0x6002000b)] HRESULT NavigateTo( [in] BSTR bstrHierarchyObjectID, [in, optional, defaultvalue("")] BSTR bstrObjectID, [in, optional, defaultvalue(0)] VARIANT_BOOL fNewWindow); [id(0x6002000c)] HRESULT NavigateToUrl( [in] BSTR bstrUrl, [in, optional, defaultvalue(0)] VARIANT_BOOL fNewWindow); [id(0x6002000d)] HRESULT Publish( [in] BSTR bstrHierarchyID, [in] BSTR bstrTargetFilePath, [in, optional, defaultvalue(0)] PublishFormat pfPublishFormat, [in, optional, defaultvalue("")] BSTR bstrCLSIDofExporter); [id(0x6002000e)] HRESULT OpenPackage( [in] BSTR bstrPathPackage, [in] BSTR bstrPathDest, [out] BSTR* pbstrPathOut); [id(0x6002000f)] HRESULT GetHyperlinkToObject( [in] BSTR bstrHierarchyID, [in] BSTR bstrPageContentObjectID, [out] BSTR* pbstrHyperlinkOut); [id(0x60020010)] HRESULT FindPages( [in] BSTR bstrStartNodeID, [in] BSTR bstrSearchString, [out] BSTR* pbstrHierarchyXmlOut, [in, optional, defaultvalue(0)] VARIANT_BOOL fIncludeUnindexedPages, [in, optional, defaultvalue(0)] VARIANT_BOOL fDisplay, [in, optional, defaultvalue(2)] XMLSchema xsSchema); [id(0x60020011)] HRESULT FindMeta( [in] BSTR bstrStartNodeID, [in] BSTR bstrSearchStringName, [out] BSTR* pbstrHierarchyXmlOut, [in, optional, defaultvalue(0)] VARIANT_BOOL fIncludeUnindexedPages, [in, optional, defaultvalue(2)] XMLSchema xsSchema); [id(0x60020012)] HRESULT GetSpecialLocation( [in] SpecialLocation slToGet, [out] BSTR* pbstrSpecialLocationPath); [id(0x60020013)] HRESULT MergeFiles( [in] BSTR bstrBaseFile, [in] BSTR bstrClientFile, [in] BSTR bstrServerFile, [in] BSTR bstrTargetFile); [id(0x60020014)] HRESULT QuickFiling([out, retval] IQuickFilingDialog** ppiDialog); [id(0x60020015)] HRESULT SyncHierarchy([in] BSTR bstrHierarchyID); [id(0x60020016)] HRESULT SetFilingLocation( [in] FilingLocation flToSet, [in] FilingLocationType fltToSet, [in] BSTR bstrFilingSectionID); [id(0x00000064), propget] HRESULT Windows([out, retval] Windows** ppONWindows); [id(0x00000066), propget, hidden] HRESULT Dummy1([out, retval] VARIANT_BOOL* pBool); [id(0x60020019)] HRESULT MergeSections( [in] BSTR bstrSectionSourceId, [in] BSTR bstrSectionDestinationId); [id(0x00000068), propget] HRESULT COMAddIns([out, retval] IDispatch** ppiComAddins); [id(0x00000069), propget] HRESULT LanguageSettings([out, retval] IDispatch** ppiLanguageSettings); [id(0x6002001c)] HRESULT GetWebHyperlinkToObject( [in] BSTR bstrHierarchyID, [in] BSTR bstrPageContentObjectID, [out] BSTR* pbstrHyperlinkOut); }; [ odl, uuid(6D4B9C3E-CC05-493F-85E2-43D1006DF96A), helpstring("List of our Windows Interface"), dual, oleautomation ] interface Windows : IDispatch { [id(00000000), propget] HRESULT Item( [in] unsigned long Index, [out, retval] Window** Item); [id(0x00000001), propget] HRESULT Count([out, retval] unsigned long* Count); [id(0xfffffffc), propget] HRESULT _NewEnum([out, retval] IUnknown** _NewEnum); [id(0x00000003), propget] HRESULT CurrentWindow([out, retval] Window** ppCurrentWindow); }; [ odl, uuid(8E8304B8-CBD1-44F8-B0E8-89C625B2002E), helpstring("Window Interface"), dual, oleautomation ] interface Window : IDispatch { [id(00000000), propget] HRESULT WindowHandle([out, retval] uint64* pHWNDWindow); [id(0x00000001), propget] HRESULT CurrentPageId([out, retval] BSTR* pbstrPageObjectId); [id(0x00000002), propget] HRESULT CurrentSectionId([out, retval] BSTR* pbstrSectionObjectId); [id(0x00000003), propget] HRESULT CurrentSectionGroupId([out, retval] BSTR* pbstrSectionObjectId); [id(0x00000004), propget] HRESULT CurrentNotebookId([out, retval] BSTR* pbstrNotebookObjectId); [id(0x00000009)] HRESULT NavigateTo( [in] BSTR bstrHierarchyObjectID, [in, optional, defaultvalue("0")] BSTR bstrObjectID); [id(0x0000000a), propget] HRESULT FullPageView([out, retval] VARIANT_BOOL* pIsFullPageView); [id(0x0000000a), propput] HRESULT FullPageView(VARIANT_BOOL pIsFullPageView); [id(0x0000000b), propget] HRESULT Active([out, retval] VARIANT_BOOL* pIsActive); [id(0x0000000b), propput] HRESULT Active(VARIANT_BOOL pIsActive); [id(0x0000000d), propget] HRESULT DockedLocation([out, retval] DockLocation* pDockLocation); [id(0x0000000d), propput] HRESULT DockedLocation(DockLocation pDockLocation); [id(0x0000000e), propget] HRESULT Application([out, retval] IApplication** ppiApp); [id(0x0000000f), propget] HRESULT SideNote([out, retval] VARIANT_BOOL* pIsSideNote); [id(0x00000010)] HRESULT NavigateToUrl([in] BSTR bstrUrl); [id(0x00000011)] HRESULT SetDockedLocation( [in] DockLocation DockLocation, [in] tagPOINT ptMonitor); }; [ uuid(E2E1511D-502D-4BD0-8B3A-8A89A05CDCAE), helpstring("IOneNoteEvents Interface"), nonextensible ] dispinterface IOneNoteEvents { properties: methods: [id(0x00000001)] void OnNavigate(); [id(0x00000002)] void OnHierarchyChange([in] BSTR bstrActivePageID); }; [ uuid(D7FAC39E-7FF1-49AA-98CF-A1DDD316337E), version(1.0), helpstring("Application Class") ] coclass Application { [default] interface IApplication; [default, source] dispinterface IOneNoteEvents; }; typedef [uuid(D3F5A756-4BAC-4D3D-9BAF-90935121AAA6)] enum { hrMalformedXML = 0x80042000, hrInvalidXML = 0x80042001, hrCreatingSection = 0x80042002, hrOpeningSection = 0x80042003, hrSectionDoesNotExist = 0x80042004, hrPageDoesNotExist = 0x80042005, hrFileDoesNotExist = 0x80042006, hrInsertingImage = 0x80042007, hrInsertingInk = 0x80042008, hrInsertingHtml = 0x80042009, hrNavigatingToPage = 0x8004200a, hrSectionReadOnly = 0x8004200b, hrPageReadOnly = 0x8004200c, hrInsertingOutlineText = 0x8004200d, hrPageObjectDoesNotExist = 0x8004200e, hrBinaryObjectDoesNotExist = 0x8004200f, hrLastModifiedDateDidNotMatch = 0x80042010, hrGroupDoesNotExist = 0x80042011, hrPageDoesNotExistInGroup = 0x80042012, hrNoActiveSelection = 0x80042013, hrObjectDoesNotExist = 0x80042014, hrNotebookDoesNotExist = 0x80042015, hrInsertingFile = 0x80042016, hrInvalidName = 0x80042017, hrFolderDoesNotExist = 0x80042018, hrInvalidQuery = 0x80042019, hrFileAlreadyExists = 0x8004201a, hrSectionEncryptedAndLocked = 0x8004201b, hrDisabledByPolicy = 0x8004201c, hrNotYetSynchronized = 0x8004201d, hrLegacySection = 0x8004201e, hrMergeFailed = 0x8004201f, hrInvalidXMLSchema = 0x80042020, hrFutureContentLoss = 0x80042022, hrTimeOut = 0x80042023, hrRecordingInProgress = 0x80042024, hrUnknownLinkedNoteState = 0x80042025, hrNoShortNameForLinkedNote = 0x80042026, hrNoFriendlyNameForLinkedNote = 0x80042027, hrInvalidLinkedNoteUri = 0x80042028, hrInvalidLinkedNoteThumbnail = 0x80042029, hrImportLNTThumbnailFailed = 0x8004202a, hrUnreadDisabledForNotebook = 0x8004202b, hrInvalidSelection = 0x8004202c, hrConvertFailed = 0x8004202d, hrRecycleBinEditFailed = 0x8004202e, hrAppInModalUI = 0x80042030 } Error; [ uuid(DC67E480-C3CB-49F8-8232-60B0C2056C8E), version(1.0), helpstring("Application2 Class") ] coclass Application2 { [default] interface IApplication; [default, source] dispinterface IOneNoteEvents; }; }; So far, I didn't manage to be able to interact with it : There is my code (based on same issue someone had in 2011
      #AutoIt3Wrapper_UseX64=n #include <Array.au3> #include "AutoItObject\AutoItObject.au3" ;=============================================================================== ;interface "OneNoteIApplication" Global Const $sCLSID_OneNoteApplication = "{0039FFEC-A022-4232-8274-6B34787BFC27}" Global Const $sIID_IOneNoteApplication = "{2DA16203-3F58-404F-839D-E4CDE7DD0DED}" ; Definition Global $dtagIOneNoteWindows = $dtagIDispatch Global $dtagIOneNoteApplication = $dtagIDispatch & _ "GetHierarchy hresult(bstr;dword;bstr*);" & _ "UpdateHierarchy hresult(bstr);" & _ "OpenHierarchy hresult(bstr;bstr;bstr*;dword);" & _ "DeleteHierarchy hresult(bstr;double);" & _ "CreateNewPage hresult(bstr;bstr*;dword);" & _ "CloseNotebook hresult(bstr);" & _ "GetHierarchyParent hresult(bstr;bstr*);" & _ "GetPageContent hresult(bstr;bstr*;dword);" & _ "UpdatePageContent hresult(bstr;double);" & _ "GetBinaryPageContent hresult(bstr;bstr;bstr*);" & _ "DeletePageContent hresult(bstr;bstr;dword);" & _ "NavigateTo hresult(bstr;bstr;bool);" & _ "Publish hresult(bstr;bstr;dword;bstr);" & _ "OpenPackage hresult(bstr;bstr;bstr*);" & _ "GetHyperlinkToObject hresult(bstr;bstr;bstr*);" & _ "FindPages hresult(bstr;bstr;bstr*;bool;bool);" & _ "FindMeta hresult(bstr;bstr;bstr*;bool);" & _ "GetSpecialLocation hresult(dword;bstr*);" ; List Global $ltagIOneNoteApplication = $ltagIDispatch & _ "GetHierarchy;" & _ "UpdateHierarchy;" & _ "OpenHierarchy;" & _ "DeleteHierarchy;" & _ "CreateNewPage;" & _ "CloseNotebook;" & _ "GetHierarchyParent;" & _ "GetPageContent;" & _ "UpdatePageContent;" & _ "GetBinaryPageContent;" & _ "DeletePageContent;" & _ "NavigateTo;" & _ "Publish;" & _ "OpenPackage;" & _ "GetHyperlinkToObject;" & _ "FindPages;" & _ "FindMeta;" & _ "GetSpecialLocation;" ;=============================================================================== _AutoItObject_StartUp() Global $objOneNote = ObjCreate("OneNote.Application") Global $pOneNote = _AutoItObject_IDispatchToPtr($objOneNote) _AutoItObject_IUnknownAddRef($objOneNote) Global $oOneNote = _AutoItObject_WrapperCreate($pOneNote, $dtagIOneNoteWindows) ;~ Global $oOnenote = ObjCreateInterface($sCLSID_OneNoteApplication,$sIID_IOneNoteApplication,$dtagIOneNoteApplication,True) ;~ ; Check if object is created: If Not IsObj($oOneNote) Then MsgBox(48, "Error", "Object not created. Something is wrong.") Exit EndIf $aCall = $oOneNote.GetTypeInfoCount(0) $iTypeInfoCount = $aCall[1] ConsoleWrite("$iTypeInfoCount = " & $iTypeInfoCount & @CRLF) $Window = $oOneNote.Windows ;~ ConsoleWrite("Test = " & $Window.CurrentPageId & @CRLF) $str = "onenote:///R:\Software\OneNote%20EOD\EOD%20Scrum\{D2EB7AEB-362B-490A-9CE0-0B9316DF0DAD}&end" $hBSTR = DllCall("oleaut32.dll", "ptr", "SysAllocString", "wstr", $str) $aCall = $oOnenote.NavigateToUrl($hBSTR[0])  
      Can someone help me to go in the good direction? I'm a little lost with what's needed, (CLSID and IID whereas I have only a UUID and can't find a good starting doc online)
      Thanks a lot,
    • X_xkijux_x
      By X_xkijux_x
      Ok so im using this program. clarify for school. I would like to have a program that takes every word i type in microsoft word and searches on it in claryfi. is this possible. I would like to have the program not stopping me from typing more after that word. Like when i type a word it auto search it on clarify without making me stop typing and if i want to change i can do that and if im fine that word i can just keep typing and it will search after the next word. 
    • Miliardsto
      By Miliardsto
      Is this possible to make program works like in diagram? There is so much encryption methods and UDFs are they give security? If the $Address will be crypted with some encryption algorithm could be possible to get the value of $Address in easy way? Of course We know its easy too look into autoit code and get value of variable and so We dont want to anyone see $Address value - there are functions Could func1.au3, func2.au3.. be for example func1.php or other type of file? As we know .php files are unnable to see. For example func1 would be read by FileRead() and then Execute() Is this generally possible to do?
      Will it give secure?
      What do you think about? Maybe there is something wrong in this concept or missed.

    • TheSaint
      By TheSaint
      TeraCopy Timer - A program of mine, front end really, that I have been working on (on & off) for some time, but not shared here before, that I recall. Third party program TeraCopy is required.
      Many of you will be familiar with TeraCopy, and it has been discussed here at AF on several occasions, in various sub forums, including Chat.
      BE ADVISED - I still use an older version of TeraCopy (v2.27), a goody but an oldy, so have only tested my program with that. It may work with the newer v3.xx, or may be easily adjusted to do so, but I have not yet gone that route. Likewise, I only use it with Win 7 and Win XP, but I don't imagine there should be any issues with newer Windows. Add to that, my program being devised and created in AutoIt v3.3.0.0.
      So what is TeraCopy Timer and why might you need it?
      I devised my program for two main reasons really, based on giving me greater control, using the Free version of TeraCopy, which has some limitations (perhaps even with the paid full version). My program utilizes the features of the TeraCopy command-line.
      1. I was fed up with Thumbs.db files regularly halting the process in Win XP or preventing a folder being deleted after a move. Only happens with Win XP.
      2. I wanted to automate delays between jobs, allowing all HDD's to rest periodically when doing large and lengthy jobs. Letting HDD's heat up too much, can have tragic results or considerably shorten their lifespan. Prevention is better than cure or just relying on monitoring software etc.
      Those familiar with TeraCopy use, know you can run multiple copy or move jobs either simultaneously or concurrently (one immediately after another has finished). With the free version at least, you have no control over precise order or timing, and no way to deal (without manual interaction) with the pesky Thumbs.db files in Win XP. TeraCopy Timer allows you to do all those things, and in a batch fashion.
      Some screenshots and brief explanation
      Main Window

      You can browse to set the Source and Destination paths, or like me, just use Drag & Drop to those inputs.
      Once the Destination path has been set, the MIN (minimalist GUI) button becomes available. In Minimal mode, you get a further level of automation, once initial options are set, and thus less prompts ... none in fact, as jobs are created automatically based on either COPY or MOVE.
      Minimalist Window

      In the Minimalist mode, you can only use Drag & Drop to add a source file or folder, and COPY or MOVE is permanently set when the window first opens, via a choice prompt.
      Assigning a WAIT is simple and easy, and is the latest feature added to the program ... I used a much more complex variant before that (see Advanced Delay).

      The program now displays three file size reports.
      Individual Size of the current (last added) job (Blue label).
      Total Size of all jobs combined (Black label).
      Subtotal Size for each grouping of jobs, defined by a WAIT selection (Red label).
      You toggle between Black and Red, by just clicking that label. If no WAIT has been set, then the values will be the same.
      The wait of 5 minutes in the screenshot above is set for the source shown. It means wait 5 minutes before copying (or moving) that source.
      More sources added from that point, add to a new subtotal. To see the previous subtotal, you need to be at the main (MAX) window, and select the prior job.
      So every time a WAIT is clicked for a source a new subtotal count is started.

      In the screenshot above, you can see the Job name, and that it is Job number 5 order wise. MOVE has been set for that job.
      Selecting Job 4, you will see the previous (complete) Subtotal. Selecting job 3 (in this instance), you would see the subtotal up to that job.
      Click the red Total label and it will change to Black, and show you the total size over all, as shown in the second screenshot above.
      This new WAIT feature is the simplest and best way to use the program generally (in my view) ... but check out the following, as it is not always the case.
      Advanced Delay Window

      The Advanced Delay Options, are a further level of automation, added during the early stages of development, before I thought to create the Minimalist window and show Sizes. It was before I decided to put a lot more effort into the program. As with all my programs though, it is continual use that eventually dictates what I ultimately want to happen, to make my life easier ... simpler, better, smarter, quicker.
      The main difference between this older method, and the new WAIT one, where you specify delays precisely, is that the program attempts to determine the best moments to pause, based on various factors, which you setup and can vary between different types of Job sessions.
      The chief purpose for all the advanced options, is an attempt to cater for the difference between moving a small number of big files and a lot of small files. Moving or Copying lots of small files (hundreds or thousands), as many would know, can heat up a HDD far quicker and to a much higher temperature than a small number of (even very) large files. I guess that is primarily due to the sheer number of indexes that need to be created, and with small files are done at a staggering rate.
      Which method you use, is up to you, and should be governed by the type of job. Both methods can be used together, but not advised if you don't want the possibility of unnecessary extra long delays. EDIT - That said, you could use the WAIT option just for a delayed start of the first job ... perhaps your PC is busy doing something else until then, but you want to go and do something else for a bit, and have it all done by the time you return (i.e. watch a movie).
      WARNING - It should go without saying, that you take all the usual precautions. For instance, don't use move with the only copy you have of precious files. BACKUP BACKUP BACKUP! Don't hold me liable for anything, except for being a nice guy who likes to share.
      TeraCopy Timer
      P.S. I am not affiliated in any way with those who created and provide the excellent third party program - TeraCopy.
    • JaredStroeb
      By JaredStroeb
      I need to open an application and send it keys in Session 0.  I have exe's working locally, I can see the application open in session 0 through interactive services, but my send commands do not go to the application.  The following article running-autoit-session-0, directs me to use ControlSend() however my application has no controls that can be identified by AutoIt v3 Window Info.  Get All Windows Controls also returned nothing for the application's handle.  
      What are my options?  
      Can this be done with AutoIt?
      Is there a different "relatively simple" library/tool to use? (I am familiar with C# if there is a viable library there )