Sign in to follow this  
Followers 0
smellyfingers

For newbies like me

6 posts in this topic

Hey ppl, i've tried to make a script to send a Chr from the extended ascii and the only way i could make it work is this way, is there other (better) ways of doing this or is this the right approach, anyways since this works for me i thought i post it if anyone else has had troubles with special chr.

#include <IE.au3>
$g_szVersion = "ieatt"
If WinExists($g_szVersion) Then Exit ; EXIT!
AutoItWinSetTitle($g_szVersion)
Local $oIE = _IEAttach("Mystart")
WinActivate("Mystart")
;MsgBox(0, "The URL", _IEPropertyGet($oIE, "locationurl"))
sleep(1000)
Send("!y")
sleep(1000)
Local $var = Chr(229)
send($var)
sleep(1000)

This example triggers a submeny link in IE with the Chr å (in my browser anyway)

Share this post


Link to post
Share on other sites



This is the wrong place to ask questions. The forum is for example scripts and not a general help and support forum.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

This is the wrong place to ask questions. The forum is for example scripts and not a general help and support forum.

Yes, this topic is between support and example forums. But It's an example (more a snippet) and as I can read, Improvements are welcome.

Edit : Regarding to the second post of Water, you should edit correctly your post, or it will be moved to the help forum.

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

But of the 13 lines of code only 2 are related to the subject. The title of the thread doesn't make clear what the thread is all about and the thread starts with a question.

And most important: What the user does can be done by using "Send" as described in the help file.

So IMHO this isn't an example and hence in the wrong forum!


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

smellyfingers,

I am moving this to "General Support" as we try to keep the "Examples" section for more complicated scripts rather than basic code taken directly from the Help file. ;)

And please use more descriptive thread titles when you post in future. :)

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Sorry for posting in the wrong forum, thanx

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

    • dilligence
      By dilligence
      Hello everyone,
      I could use some help with the following: 
      I'm a speech recognition user and recently I've started to use AutoIt for additional scripting because sometimes it works faster. 
      I would like to create an AutoIt script that will open the Chrome link on my desktop which is a a symbolic link, so that the Chrome cache is on my Ram drive:
      "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="A:\Browser Cache"
      Next I want to send the website address, in this case: https://autochords.com/ (with SendKeys) to the address bar.
      Then another SendKeys to send Enter.
      I want to use this script when I'm working on my girlfriend's computer, where speech recognition isn't installed.
      I could use ShellExecute ("Chrome", "https://autochords.com/") but then it won't run via my ram drive.
      I am a Dragon NaturallySpeaking user. The program has a scripting language similar to VBA. In Dragon the command is as follows:
      HeardWord "open","chrome" ; HeardWord acts as if I literally said "open Chrome" this command opens any desktop shortcut no matter which window I'm working in.
      Wait 1500 
      SendKeys "https://autochords.com/"
      SendKeys "{Enter}"; these last three lines are similar to AutoIt language I think.....
      Any help would be appreciated.
      Rob

       
    • Fr33b0w
      By Fr33b0w
      Hi. I am trying whole day yesterday and today to make script work. Code shouldnt be a problem but I just dont understand how some characters work. I will try to explain. I have a bunch of chars that I picked up from http://fsymbols.com/emoji/ and if you paste them in facebook page they work fine. But if you paste more then 20 or 40 (I am not sure anymore) they will not show well. Same thing happens in a script. When I had less then 20 everything worked fine. Now when I put much more it wont work. For example if code is "ΓÿÇ" then I need to get " ☀" when it goes trough code and that worked fine. When I put much more in a script it just wouldnt work. Same happens on facebook page. I have just checked it shows first 40 and then it wont decode others. Same happens in script. I even changed a bit way it works and instead that code is inside script i have put it in a .txt file so it will just load a line i need trough scrip (to make it work somehow) but it just doesnt work. Can anyone solve this ghost inside a script?
      #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $hGUI = GUICreate("v3.00", 752, 418, -1, -1) ;GUICtrlSetStyle(-1, ) GUICtrlSetFont(-1, 8.5, 400, 0, "MS Shell Dlg", 5) $oIE = ObjCreate("Shell.Explorer.2") ;GUICtrlSetStyle(-1, ) $hPic = GUICtrlCreatePic("", 13, 33, 16, 16) GUICtrlSetImage(-1, "E:\0\autoit\2014-03-31 Facebook Spec Chars\img\01.bmp") $hPic2 = GUICtrlCreatePic("", 13, 51, 16, 16) GUICtrlSetImage(-1, "E:\0\autoit\2014-03-31 Facebook Spec Chars\img\02.bmp") $hButton = GUICtrlCreateButton("#", 37, 33, 16, 16) $hButton2 = GUICtrlCreateButton("#", 37, 51, 16, 16) $hButton3 = GUICtrlCreateButton("#", 37, 69, 16, 16) $hButton4 = GUICtrlCreateButton("#", 37, 87, 16, 16) $hButton5 = GUICtrlCreateButton("#", 37, 105, 16, 16) $hButton6 = GUICtrlCreateButton("#", 37, 123, 16, 16) $hButton7 = GUICtrlCreateButton("#", 37, 141, 16, 16) GUISetState() While 1 $hMsg = GUIGetMsg() Switch $hMsg Case $GUI_EVENT_CLOSE Exit EndSwitch Select Case $hMsg = $hButton ClipPut("ðŸ") ; those are chars that needs to be inserted in a facebook Case $hMsg = $hButton2 ClipPut("â˜") ; here also Case $hMsg = $hButton3 ClipPut("☔") Case $hMsg = $hButton4 ClipPut("⛄") Case $hMsg = $hButton5 ClipPut("âš¡") Case $hMsg = $hButton7 ClipPut("") EndSelect WEnd At the end I need to get "
    • sathish
      By sathish
      Hi Forum,
      I have created a VB.net Program in which i have used two panels,
      The panels contain two text editors (Editor1, Editor2) in each panel,
      I have created 2 buttons in between the panels (1. Save Editor1, 2. Save Editor2),
      My requirement is if i click the button (1.Save Editor 1), it shud send CTRL+S to the panel 1 which contains Editor 1, and the same with Editor 2,
      The Editor 1 is nothing but notepad++ text editor, i tried to send keys to notepad++ when it opened outside my VBform created Window, it works fine, but if i cal notepad++ inside my VB form, my autoit script not sending keys to the notepad++, i dont know what is the problem, i googled a lot about it, but of no use,
      I tried to send keys from VB.net itself and that also failing, please guide me
      My Autoit script

      Winactivate ("[class:notepad++]") sleep(500) Winwaitactive("[class:notepad++]") ControlSend("[class:notepad++]", "", "", "^{s}")  
      I have attached the screenshot of my VB.net created form
      Thanks & Regards
      Sathish V.

    • nitekram
      By nitekram
      Can someone explane the following: Missing chars when using code?

      ps - looks like you can no longer paste your code with TIDY???

      #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Example1() MsgBox('', '', 'Why is the ampersand sign missing? & DEC 38') Example2() MsgBox('', '', 'Why is the Plus, Exclamation Mark, and Pound Sign missing? + DEC 43, # DEC 35, ! DEC 33') ; example 1 Func Example1() ; In this example the & is missing? Local $msg, $Left = 10, $Down = 0 GUICreate("My GUI", 100, 960) ; will create a dialog box that when displayed is centered For $x = 32 To 64 GUICtrlCreateLabel(Chr($x), $Left, $Down) $Down += 30 Next GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() EndFunc ;==>Example1 ; example 2 Func Example2() ; In this example the # and + and ! signs are missing? Run('notepad.exe') Sleep(1000) For $x = 32 To 64 Send(' ' & Chr($x)) Send("{Enter}") Next EndFunc ;==>Example2