Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all 750 articles
Browse latest View live

Object Identification problem using OATS

$
0
0

Hi,

 

I am  seeing errors when we try to identify object using OATs automation tool in application developed in Oracle EBS Forms.
Application runs on JRE 1.7.0_67(JRE Version 7 Update 67). If we have lower version of JRE, application forms are not loading.
OATS automation tool supports JRE 1.7.0_65 or lower for recognizing objects related to Oracle EBS/Forms application
If we have Application built on OATS 12.4.0.2 Build 129 and JRE 1.7.0_67 and when we try to spy any object in Test Application, I am  seeing an error.(Ref. attached screenshot OATS_EBS_Detailed_Error.jpg for more details)
Tried below steps:
1.       Installed JRE 1.7.0_65, set JAVA_HOME path, rebooted machine  
(Machine now has both JRE 1.7.0_65 and JRE1.7.0_67 environments. Ref. Screenshot JavaEnvironment.jpg)
2.       Enabled JRE 1.7.0_65 version in OATS
(Refer. Attached screenshot Enable JRE 1.7.0_65.jpg for more details)
3.       Rebooted Machine
4.       Tried identifying objects – I am  still seeing the same error

Any help on this appreciated

 

Enable JRE 1.7.0_65.png

JavaEnvironment.png

OATS_EBS_Detailed_Error.png

 

 


AutoIt Tidy crashes

$
0
0

On my home machine it works fine but on my work one it crashes with this error

Similar installs on both same version not beta

 

Tidy AutoIt3 v2.4.1.6   Copyright (coffee) Jos van der Zande  June 2, 2014

>Exit code: 3221225477    Time: 4.398

 any suggestions?

Serial Driver not connected to hardware

$
0
0

I am currently writing a serial driver in visual basic 3.0 but unfortunately I do not have a cheerio screw because I only ordered it from the manufacturer which is located at 123 Kellogs Avenue, Ripney, Arkansaw. Since I do not have the appropriate hardware, I do not know what port is the right one to output bytes to, and if there are too many bytes in wrong port, then right port gets used up and has no more cheerios. How do I use right port and wrong port at the same time without transferring bytes from right port to wrong port? Also, how I can keep both ports closed while only writing to each of them sometimes?

The dilemma of Task Manager

$
0
0

Hi guys,

I'm posting here because isn't relative to an autoit problem, i'll explain:

 

I'm on Windows Tech Preview, yeah cool. The task Manager like the previous version has the feature "On Top" but this time is really on top and i don't understand why it can.

In Widows XP, Windows 7 etc. a whatever window stay on top of the Z order ( with TOPMOST ) the task manager also with the feature enabled was on the "foreground" but this time not.

 

I have check the style with a spy tool:

Style:

OVERLAPPEDWINDOW

VISIBLE

CLIPSBLINGS

 

ExStyle:

WINDOWEDGE

TOPMOST ( if the feature is enabled )

 

Spy++, Autoit Window Info etc. don't stay on top of the task manager with the "On top" enabled but Task Manager always win...

Someone has an idea? How he can stay on top of other windows? How to defeat him? :D

 

P.S. Without remove the style from the Task Manager

Integrating autoit script with CI (Jenkins)

$
0
0

Hi All,

I have been testing windows installation (.exe/.msi) with autoit. But just wondering, is there any way that I can integrate these .au3 files with Jenkins server. Can someone please help me out.

 

Thanks

Rj

Excel filters

$
0
0

HI All,

How to operate filters in excel using Autoit

RSA Encryption?

$
0
0

I have this private key:

Plain Text         
-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEA3XK9BWuIHIS3R6za4WU/mQ0WlsPD/ErtzSTw2ZmbhI0lyKcQ Ugk0aRIOaq4vTE+EpRtI6hvhH4AIm+15sWPqxpfuNR0Dvigse+BhuypFsqI+AWiL dj5RrPSzrLcqWgjE5zSjUG4OmxS4NJJRY9UMNaEhtqsrgrFFj4iMX07bz6Joyp85 CHpGJhmFjPwU60OlUkGKwvs6TeQXUZlH9ypzXkNAhF4uDchTgEX7A/8yrqHzPx7/ r2T0Lww7kp106ACdy9wXTpq5v3tmfNZbZ7K0bEB4g8Ez43Hew1P5b/tabUV4pZL0 LkvDCA78ll8FHeuJjZA3+DKlEgyA2EWTs98VTQIDAQABAoIBAC65evCd08ZQqmtR KY3NUzHz9QQyojOli69xT/BZ3NqG/aXsuiDVGF3jFW+k+Q3c6Vv8+dGLuGBxH1/n J3oqXuswO26xhIym5Vvt6DEZpkMewH6DlImKdKlNqGuU6ja9Cu7NyHe8ARDvuj49 cTbjSQQ3z2k/jJqy1L6ITTX+6ZpRgZd9m/Ng5O0GBcoSiUjysfLgs5m5lHWCojL+ ppxqhsWXDM2ejIFGncGok798NNps+OkAM9EwEHcEI7qBo/UEsgXwnmlUvsyBvtq3 7NS/znsJlOT/PfbS3i0gIac6AmA0qh86zN+uC5yl44aY+WpwPqBua6eeKkpk3xAo LrCRxHECgYEA/689gaRf0ihJ5WpD/cq6XLFwxuu4/CmmNjYpTwol2S3lGnq03RLZ FhklvMKIkhfuaOLyrHgUWaYZVr2KBUU81qwHTVEZeN6rWPeXTsfgBnpShIYYXqBN ePyqVDuISs44Lsi74fhSNrqai6ow6GQYlZewcdjS2zVc35G1of/cWNMCgYEA3biv L49okrATQfBbdl5L6hueqNc8pfrv6EKYcw5SE48fFeHCToorKpaf4kf7GemITldD 29FFwukhyt1rJJI9Kvj6jKN49QZr3xS1d8QY0lOHnRRRLIg3x+VaD7RYOWuHbqs1 MKyzgeKkpWq6EkuaW2ZEQwL6cvzqGsbo1CRqBV8CgYBMNqEf1q5VR3sXbkCMEvTQ EngqYzNFvuhzelt/2ueDQCHtbawhxa993csY4+evnICNNTDe5gAy5MbiyyasAYJr /uVCT61HESCEKXEpo3yMkcOtCweSlTfim3XuG7y5h5TJpT4T0mA3PhI5FWb0rnmB hbCrjtTzUIm5foZkno7AzwKBgD2PTXSTCKHRqUchiQNwYvt497BBMmGTLpD6DIHF dBxiHGti5yQPULTeZT3aZmlnYaT+raSWkhvvxqYgm+Lnh3wq7MWnjanaQpEJmujJ 1WpwLrL6NR98IqCpmTvLAsPOiye6+WWuTZi+aKBU5Zy2yQCfgExqw0ax2f3dRD/C bH1ZAoGAOJ/pLNpetFyE/aaD0jBfMA6UACdutjWT4vFGmk/GwBh3/sHoMbON2c/P OeEM/N3/ZODOZHzXB1ALgWIjeoP2TegBfbniHf2d+j1/VRMTiYEMv3ws06YiWMLJ ioX2ZNntCCPlIti48TeFs0etqcHQgQ5rSLblyde3RIuRcqatQko= -----END RSA PRIVATE KEY-----

And all I know is that I have to encrypt some buffer with this private key (Yes, private key should be used for decryption, not encryption, I guess, but the protocol I am trying to implement works this way.).

 

Any help would be really great as I'm stucked on this about 2 days.

Thanks in advance.

osquery


Run AutoIT script while Windows is installing devices?

$
0
0

Hi

 

Is it possible to run your script while Windows is installing devices? Im currently developing a deployment solution using pure AutoIT scripting. During Windows Deployment, after the image has been deployed, it will install device drivers during first reboot and I want to be able to run my script while it does.

 

Does anyone know if that is possible og does it has to be run as a Windows Service?

 

 

Thanks in advance!

 

/Daniel

considdering changing to AutoHotKey

$
0
0

I've been using AutoIt for years, anyway, i wanted some better ways to debug my scripts, i wanted  a debugger.. stack trace, inspect variables, and most importantly, breakpoints & stepping, 

 

 

seems like AutoIt doesn't have any of this. but seems like AutoHotKey does have (per http://fincs.ahk4.net/scite4ahk/pages/debugger.htm ), additionally, i don't have source code access to AutoIt, so there's not much i  can  about it either; 
 

so... opinions?   also i wonder, is there any plans to make debugging tools for AutoIt? :o

C4 - C in four functions

Help with IUIAutomation and Google Chrome

Should Au3Stripper strip #ForceDefs?

$
0
0

I use a couple of instances of #ForceDef to cover cases where variables aren't declared in a "proper order" within the script.  The problem is that when I compile the script with the strip option on, the line is removed and the AU3 PreCheck fails.

 

I solve things by inserting the #ForceDef line into the displayed MyScript Stripped.au3 result and then compiling that version.  But that's an extra step I have to perform on every recompile.

 

Should Au3Stripper leave #ForceDefs alone?  Or is there a way to "force the ForceDefs"?

 

FDef Question.png

Suggestion for Autoit regarding #include an constants

$
0
0

A common problem I have is trying to use new and old autoit code, where the new code relies on newer UDF's and the UDF's have constants which are identical to constants declared in the the older code.

 

I have come up with 3 potential solutions

 

1. access modifyers for #include (e.g. private #include "somefile.au3")

 

2. The autoit not raising an error if a constant or function was redeclared if it is identical to their original decleration

 

3. making global variables not used in the main script invisible to other #includes

 

I hope the autoit team takes one of these ideas onboard as re-writing old autoit code to work with new autoit code is quite anoying.

iSeries reporting challenge

$
0
0

The spool file data does not contain all of the information you need on your business documents. What is your solutions?


Convert C# into autoit

$
0
0
HELLO:
Convert C# into autoit, can you help? , can you help? Example of this is a PDF conversion to Image, calls the DLL file
 
C#         
  1. using System;
  2. using System.Configuration;
  3. using System.Drawing;
  4. using System.IO;
  5. using System.Runtime.InteropServices;
  6. using System.Windows.Forms;
  7. using System.Drawing.Imaging;
  8. using System.Diagnostics;
  9.  
  10. namespace Acrobat.pdf2image
  11. {
  12.     public class Program
  13.     {
  14.         /// <summary>
  15.         /// PDF Document transformation method for the picture
  16. ,method:ConvertPDF2Image("F:\\A.pdf", "F:\\", "A", 0, 0, null, 0);
  17.         /// default value
  18. ,startPageNum  default value
  19. =1,endPageNum  default value is the total number of pages
  20.         /// imageFormat default value =ImageFormat.Jpeg,resolution  default value = 1
  21.         /// </summary>
  22.         /// <param name="pdfInputPath">PDF file path
  23. </param>
  24.         /// <param name="imageOutputPath">image Output Path</param>
  25.         /// <param name="imageName">imageName,Do not need to bring the extension
  26. </param>
  27.         /// <param name="startPageNum">startPage number,default value
  28. =1</param>
  29.         /// <param name="endPageNum">endPage number,default value= PDF Total number of pages
  30. </param>
  31.         /// <param name="imageFormat">imageFormat</param>
  32.         /// <param name="resolution">resolution,The greater the number the more clear
  33. default value
  34. =1</param>
  35.         public static void ConvertPDF2Image(string pdfInputPath, string imageOutputPath,
  36.             string imageName, int startPageNum, int endPageNum, ImageFormat imageFormat, double resolution)
  37.         {
  38.             Acrobat.CAcroPDDoc pdfDoc = null;
  39.             Acrobat.CAcroPDPage pdfPage = null;
  40.             Acrobat.CAcroRect pdfRect = null;
  41.             Acrobat.CAcroPoint pdfPoint = null;
  42.  
  43.             // Create the document (Can only create the AcroExch.PDDoc object using late-binding)
  44.             // Note using VisualBasic helper functions, have to add reference to DLL
  45.             pdfDoc = (Acrobat.CAcroPDDoc)Microsoft.VisualBasic.Interaction.CreateObject("AcroExch.PDDoc", "");
  46.  
  47.             // validate parameter
  48.             if (!pdfDoc.Open(pdfInputPath)) { throw new FileNotFoundException(); }
  49.             if (!Directory.Exists(imageOutputPath)) { Directory.CreateDirectory(imageOutputPath); }
  50.             if (startPageNum <= 0) { startPageNum = 1; }
  51.             if (endPageNum > pdfDoc.GetNumPages() || endPageNum <= 0) { endPageNum = pdfDoc.GetNumPages(); }
  52.             if (startPageNum > endPageNum) { int tempPageNum = startPageNum; startPageNum = endPageNum; endPageNum = startPageNum; }
  53.             if (imageFormat == null) { imageFormat = ImageFormat.Jpeg; }
  54.             if (resolution <= 0) { resolution = 1; }
  55.  
  56.             // start to convert each page
  57.             for (int i = startPageNum; i <= endPageNum; i++)
  58.             {
  59.                 pdfPage = (Acrobat.CAcroPDPage)pdfDoc.AcquirePage(i - 1);
  60.                 pdfPoint = (Acrobat.CAcroPoint)pdfPage.GetSize();
  61.                 pdfRect = (Acrobat.CAcroRect)Microsoft.VisualBasic.Interaction.CreateObject("AcroExch.Rect", "");
  62.  
  63.                 int imgWidth = (int)((double)pdfPoint.x * resolution);
  64.                 int imgHeight = (int)((double)pdfPoint.y * resolution);
  65.  
  66.                 pdfRect.Left = 0;
  67.                 pdfRect.right = (short)imgWidth;
  68.                 pdfRect.Top = 0;
  69.                 pdfRect.bottom = (short)imgHeight;
  70.  
  71.                 // Render to clipboard, scaled by 100 percent (ie. original size)
  72.                 // Even though we want a smaller image, better for us to scale in .NET
  73.                 // than Acrobat as it would greek out small text
  74.                 pdfPage.CopyToClipboard(pdfRect, 0, 0, (short)(100 * resolution));
  75.  
  76.                 IDataObject clipboardData = Clipboard.GetDataObject();
  77.  
  78.                 if (clipboardData.GetDataPresent(DataFormats.Bitmap))
  79.                 {
  80.                     Bitmap pdfBitmap = (Bitmap)clipboardData.GetData(DataFormats.Bitmap);
  81.                     pdfBitmap.Save(Path.Combine(imageOutputPath, imageName) + i.ToString() + "." + imageFormat.ToString(), imageFormat);
  82.                     pdfBitmap.Dispose();
  83.                 }
  84.             }
  85.  
  86.             pdfDoc.Close();
  87.             Marshal.ReleaseComObject(pdfPage);
  88.             Marshal.ReleaseComObject(pdfRect);
  89.             Marshal.ReleaseComObject(pdfDoc);
  90.             Marshal.ReleaseComObject(pdfPoint);
  91.  
  92.         }
  93.  
  94.         [STAThread]
  95.         public static void Main(string[] args)
  96.         {
  97.             ConvertPDF2Image("F:\\Events.pdf", "F:\\", "A", 0, 0, null, 0);
  98.         }
  99.  
  100.     }
  101. }

Question about if function with copy/paste

$
0
0

* I also wrote it in General Help and Support forum - if it's not allowed, please delete one of them :)

 

im pretty new to AutoIt and i have a question,

 

How can i do that the code will check if the clipboard is empty or with content

for example,

i built a program that has 10 buttons, each button relate to a text box that contain url addresses (of sports websites)

 

each button copy to clipboard the url that inside the textbox (1,2,3 etc)

 

some of them are empty sometimes (i edit them for testing or for updates)

Then it paste it to Url box address inside the software and press "Go".

 

the problem is, if it copied an empty textbox the program will give it an error and autoit wont continue

 

the is a solution that autoit will check if the clipboard is empty or with content?

 

something like:

If $clipboard <> "0" Then
MouseClick("Left",72,269) ;Continue to the next address
ElseIf $clipboard <> "1" Then
Send("{CTRLDOWN}v{CTRLUP}")
EndIf

I tried many ways but no success so far

There is anything like that?

 

Any solution would be welcome! 

Thanks!

Delphi Canvas <<=>> AutoIt

$
0
0
What Deplhi Canvas are ?
Can somebody do small describtion in realtion to AutoIt ?

edit: typo

GUICtrlSetGraphic and new $GUI_GR_RESET

$
0
0
 
In my opinion, we should add $GUI_GR_RESET for reset the grapic (GUICtrlCreateGraphic, GUICtrlSetGraphic)
Like this:
GUICtrlSetGraphic($hGraphic, $GUI_GR_RESET) ; Clear EVERYTHING that already draw by GUICtrlSetGraphic  

Is it ok?

TeamViewer API - VBS - question about return value

$
0
0

I'am working on TeamViewer API

here is a part of example in VBS

Visual Basic         
  1. Function GetAllConnectionsAPI(strAccessToken)
  2.    
  3.    
  4.     WScript.Echo vbCrLf
  5.     WScript.Echo "Get all connections..."
  6.     WScript.Echo "Request [GET] /api/" & apiVersion & "/reports/connections"
  7.    
  8.     Set http = CreateObject("Msxml2.XMLHTTP")
  9.     http.Open "GET", tvApiBaseUrl & "/api/" & apiVersion & "/reports/connections", False
  10.     http.setRequestHeader "Authorization", "Bearer " & strAccessToken
  11.  
  12.     On Error Resume Next
  13.     Err.Clear
  14.        
  15.     http.send
  16.  
  17.     If Err.Number <> 0 Then
  18.         EchoErrorDetails("GetAllConnectionsAPI request failed")        
  19.         GetAllConnectionsAPI = False
  20.         Exit Function
  21.     End If
  22.  
  23.     'Check response
  24.    Dim status, statusText, response
  25.     response = http.responseText
  26.     FixHttpStatusBug http, status, statusText
  27.     WScript.Echo status & " " & statusText
  28.    
  29.     If status <> 200 Then
  30.             WScript.Echo "Unexpected response code. Received content was:"
  31.             WScript.Echo response
  32.             GetAllConnectionsAPI = False
  33.             Exit Function
  34.     End If
  35.  
  36.     On Error Resume Next
  37.     Err.Clear
  38.  
  39.     Set json = New VbsJson
  40.     Set allConnectionsResultJSON = json.Decode(response)
  41.  
  42.     If Err.Number <> 0 Then
  43.         EchoErrorDetails("JSON Decode failed")        
  44.         GetAllConnectionsAPI = False
  45.         Exit Function
  46.     End If
  47.    
  48.     If allConnectionsResultJSON then
  49.         WScript.Echo "Request ok!"
  50.         if allConnectionsResultJSON.exists("next_offset") Then
  51.             Dim moreConnections 'our received, more than 1000, connections as array of dictionaries
  52.             moreConnections = GetMoreConnectionsAPI(strAccessToken, allConnectionsResultJSON)
  53.             GetAllConnectionsAPI = moreConnections
  54.         elseif allConnectionsResultJSON.exists("records") Then
  55.             Dim connectArr(0) 'our received, less than 1000, connections as array of dictionaries
  56.            connectArr(0) = allConnectionsResultJSON.Item("records")
  57.             GetAllConnectionsAPI = connectArr
  58.         else
  59.             WScript.Echo "no more connections received"
  60.         end if
  61.     else
  62.         WScript.Echo "Connections Get: error"
  63.     end if  
  64.    
  65. End Function

As I do not know VBS I have one question:

in line 19 

GetAllConnectionsAPI = False

is this set return value for this function ?

 

EDIT: Typo

Viewing all 750 articles
Browse latest View live


Latest Images