Sign in to follow this  
Followers 0
TehnicDream

AutoIT and Java with JACOB

8 posts in this topic

#1 ·  Posted (edited)

Hi, im new to autoit and i have a little problem i have to do a app to start some web pages and some windows base programs oane of them is Skype,

the problem is that Skype starts but only in system tray and i do not know how to appear on desktop the code i use is below:

 

public static String jvmBitVersion(){
        return System.getProperty("sun.arch.data.model");
}   
    
    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         
                  
        String jacobDllVersionToUse;
            if (jvmBitVersion().contains("32")){
                jacobDllVersionToUse = "jacob-1.18-M2-x86.dll";
            }
            else {
                jacobDllVersionToUse = "jacob-1.18-M2-x64.dll";
            }

        File file = new File("lib", jacobDllVersionToUse);
        System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());

            AutoItX x = new AutoItX();
                x.run("C:\\Program Files (x86)\\Skype\\Phone\\Skype.exe");
                x.sleep(2000);
                x.winWaitActive("Skype");
                x.winActivate("Skype");
                
    }

 

Edited by TehnicDream

Share this post


Link to post
Share on other sites



Hi again i did it but the problem new is that i cant send tab or somting else only plain text

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         
                  
        String jacobDllVersionToUse;
            if (jvmBitVersion().contains("32")){
                jacobDllVersionToUse = "jacob-1.18-M2-x86.dll";
            }
            else {
                jacobDllVersionToUse = "jacob-1.18-M2-x64.dll";
            }

        File file = new File("lib", jacobDllVersionToUse);
        System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());

        AutoItX x = new AutoItX();
        x.run("Skype", "C:/Program Files (x86)/Skype/Phone", AutoItX.SW_MAXIMIZE);
        x.winActivate("Skype");
        x.winWaitActive("Skype");
        x.sleep(2000);
        x.send("nu mai merge de aici sau pana aici merge");
        x.sleep(1000);
        x.send("{TAB}!n");

    }

 

Share this post


Link to post
Share on other sites

Hy, there is someone that cant help pls ? 

Share this post


Link to post
Share on other sites

Ok, sory i will repost ther,

Thy

Share this post


Link to post
Share on other sites

Hi im new with AutoIT and i have a problem with integration with java i  manage to do a script to open skype throw a java app but the problem is that the autoit part only sends text i need to sends things like ENTER and TAB this is the code

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         

        String jacobDllVersionToUse;
            if (jvmBitVersion().contains("32")){
                jacobDllVersionToUse = "jacob-1.18-M2-x86.dll";
            }
            else {
                jacobDllVersionToUse = "jacob-1.18-M2-x64.dll";
            }
         try{ 
        File file = new File("lib", jacobDllVersionToUse);
        System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath());
 
        AutoItX x = new AutoItX();
        x.run("Skype", "C:/Program Files (x86)/Skype/Phone", AutoItX.SW_SHOW);
        x.winActivate("Skype");
        x.winWaitActive("Skype");
        x.sleep(2000);
        x.send("{TAB}!n" );
         }catch(Exception e){
           
       } 
    }

Thy

Share this post


Link to post
Share on other sites

Ok, sory i will repost ther,

Thy

No need to repost, just request for getting it moved or else you end up with 2 threads on the same topic.

Topics merged. :)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

    • Skysnake
      By Skysnake
      Scite comes up occasional, almost incidentally, in some support topics.  I have not found a "Scite" topic in the forums, so this is where I will start.  I have recently been using Scite intensively, specifically with a large project and I have certain issues.  I know that Scite is not an AutoIt product, but it is so closely integrated to the core release that it makes sense to raise issues and request support here.  If this is not the right please refer me to the right forum.
      Thx
       
      Skysnake
    • P3rsp3ctiv3
      By P3rsp3ctiv3
      Hello how can I send a {Enter} into the edit window ($cmd)? I tried it first with:
      GUICtrlSetData($cmd, "Line 1" + "{ENTER}")
      but it doesn´t work. Can someone help me please?
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $Admin = GUICreate("Admin", 234, 168, 192, 229, $GUI_SS_DEFAULT_GUI, BitOR($WS_EX_OVERLAPPEDWINDOW,$WS_EX_TRANSPARENT,$WS_EX_WINDOWEDGE)) GUISetBkColor(0xB4B4B4) $exit = GUICtrlCreateButton("Close", 160, 136, 65, 25) $cmd = GUICtrlCreateEdit("",0, 0, 225, 137, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 10, 400, 0, "Candara") GUICtrlSetBkColor(-1, 0xE3E3E3) $cmd_clear = GUICtrlCreateButton("Clear", 9, 136, 65, 25) GUISetState(@SW_SHOW) HotKeySet("{f1}", CMD_1) HotKeySet("{f2}", CMD_2) While 1 $msg = GUIGetMsg(1) Switch $msg[0] Case $GUI_EVENT_CLOSE Exit Case $exit GUIDelete($Admin) Exit EndSwitch WEnd Func CMD_1(); GUICtrlSetData($cmd, "Line 1" & "{ENTER}") GUICtrlSetData($cmd, "Line 2" & "{ENTER}") EndFunc Func CMD_2(); GUICtrlSetData($cmd, "Line 3" & "{ENTER}") GUICtrlSetData($cmd, "Line 4" & "{ENTER}") EndFunc
    • nacerbaaziz
      By nacerbaaziz
      hello
      please i need to link a progress bar with a time can you help me?
      e.g
      i want to set a progress bar for 10 sec
      am waiting for your answers
      thank you.
    • AdminC
      By AdminC
      #RequireAdmin
      #include <SendMessage.au3>
      #include <WinAPI.au3>
      #include <WindowsConstants.au3>
      #include <GDIPlus.au3>
      #include <GUIConstantsEx.au3>
      #include <WinAPIGdi.au3>
      #include <Array.au3>
      #include <WinAPIDiag.au3>
      $Imglocation = @ScriptDir&"\Image\testimg.bmp"
      _GDIPlus_Startup()
      Local $Bitmap = _GDIPlus_BitmapCreateFromFile($Imglocation)
      Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($Bitmap)
      Local $imgSize = _WinAPI_GetBitmapDimension($hBitmap)
      Local $imgBits = DllStructCreate('dword[' & ($imgSize.X * $imgSize.Y) & ']')
      _WinAPI_GetBitmapBits($hBitmap, DllStructGetSize($imgBits), DllStructGetPtr($imgBits))
      _WinAPI_DisplayStruct($imgBits)
      MsgBox(0, "", DllStructGetData($imgBits, 1, 1)) 
      _GDIPlus_Shutdown()
      DllstructGetData can't get data color B, G, R value. Who's know that? teach me plz
       
    • Miliardsto
      By Miliardsto
      Hello. Im trying to make my scripts safe - unnable to decompile. I search for obfuscators and other security methods but the search has come to nothing.
      Then one guy gave that idea below. If I rightly understood this idea lets we talk about example program with this secutiy method.
      Program have two parts, first is only login gui and the second part is the main program Second part (main program) is uploaded on ftp server lets say that on http://xxx/autoit/main_program.au3 So we have the first gui with login, we put correctly login and pass and this is the moment when code from http://xxx/autoit/main_program.au3 will be downloaded and executed Finally main program will be appear This is the similiar way like new games are protected by cracking.
      I have few questions in this moment about this:
      Is something like that even possible to do with the autoit? First part of program (login gui) must have somewhere given that link to download the rest of code - http://xxx/autoit/main_program.au3 to make it execute. As we know this first part of program is easy able to hack and retrieve this web url http://xxx/autoit/main_program.au3 where located is main part of program. Is the way to encrypt or secure it? If only code will be stored in .php we know it cannot be previewed. So it could for example get code from .php file instead of .au3 I know that methods works in other languages (I dont know exactly how) thats becouse I only speculates, maybe something may looks different in these solution? Other way would be compiling second part of code on web server (there are available web autoit servers) maybe this way is possible? Tell me anything U know about this ideas and if its even possible to achieve.
      Thanks for ur any response, advice or thoughts