Jump to content
Sign in to follow this  

Coverting Chars (Facebook Emoticons)

Recommended Posts

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)

While 1
    $hMsg = GUIGetMsg()
    Switch $hMsg
        Case $GUI_EVENT_CLOSE
        Case $hMsg = $hButton
            ClipPut("ðŸ") ; those are chars that needs to be inserted in a facebook
        Case $hMsg = $hButton2
            ClipPut("â˜") ; here also
        Case $hMsg = $hButton3
        Case $hMsg = $hButton4
        Case $hMsg = $hButton5
        Case $hMsg = $hButton7

At the end I need to get "

Share this post

Link to post
Share on other sites

Emoticons and stuff like that are processed by the site. Emoji are usually Fonts that just change how chars are represented. 

If it's a problem of them not showing it would likely be because of the chars or collection of chars conflicting with each other. 
Basically you need either time between each paste and/or Spaces between them. 

Or I could be completely confused as to what you're after. 

A true renaissance man

Share this post

Link to post
Share on other sites

First of all much thanks for your answer because I am desperate to solve this. Strange thing about this is that sometimes I get from a script one result and then complitely other. Its not connected to a browser or a site. But similar thing happens on a site. Since I cant paste them here you could look at some examples in here: (cant post direct link but search for "Interesting-WEB-Links"). Its new group I oppened to test stuff so it has nothing to do with advertising. Since it reacts same way as script I see no better way to show my problem...  Here results are breaking the code and cant be shown... There I did some tests and I can paste you there exact results which I am getting from a script.

EDIT: If anyone had problem with a special chars that goes trough autoit code and then change itself for no proper reason (at least known to me), please give me some hint. Thank you! OS is XP...

REEDIT: In some emotic0ns there was 4th char missing and that caused a bug. Dont know how because those ones wasnt even triggered by user (me)... now I am trying to reedit the whole thing...

Edited by Fr33b0w

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By FengHuangWuShen
      So I was playing with INet and downloading files and made a simple video downloader, or it can even be used for any file really.
      Just follow the reference section in INet_Settings.ini , and then run the script.
      Main Script <snip>
      INet_Settings.ini  URL - The target URL of the video you're trying to grab Data - This is the starting string, and ending string reference to look for the download URL itself. Settings - Only setting here currently, is the delay in which to wait for the file to download ### Reference for Start and End points for various websites <snip>
      Credits to : https://www.autoitscript.com/forum/profile/31965-progandy/  for the URL Encode and Decode.
    • By ThePoro
      I have a problem with getting first 10 characters with a big txt file, about 50k lines. I only want 10 characters of each line and save it into another file. I tried to use Stringleft every line and save it into another file but it was really slow to do it. I tried to save it into a variation like $var=$var&stringleft($file,10)&@CRLF. It's faster but still really slow.
      Can anybody help me with this
      Thank you so much
    • By Stew
      (Edited from original.  Please note that I AM NOT AN AUTOIT EXPERT.  I write code using Autoit frequently but I am no expert, especially when it comes to I/O.  So any remarks that start with "Why did you..." can be answered by referring to the first sentence.  This project was done in Autoit because of an interface I built to display the data.)
      Attached is a program and ascii input file I wrote to read stock price data, convert it to binary and then read it back into the program in binary.  The goal was to show increased performance for reading the files in binary and provide a demo on how to read/write binary for int32, int64, double and strings for anyone who might find it helpful.  The results on my PC show the following:
      Time to read ascii file only: 456.981951167202
      Ascii read & process time: 6061.83075631701
      Binary write file time: 14787.9184635239
      Time just to read binary file: 42.418867292311
      Binary read and process time: 4515.16129830537
      A couple things to note:
      1) The 32 MB ascii file took 10x longer to read than the 15 MB binary file.  Not entirely sure why.  Both were read into a buffer.
      2) The Binary write takes a long time but I made no effort to optimize this because the plan was to write this file one time only so I don't mind if it takes longer to write this file.  I care much more about how long it takes to read the file because I will be reading it many times.
      3) There was a modest gain in converting the ascii file to binary in terms of file size and reading speed.
      So big picture... not sure it's worth the effort to convert the files to binary even though most of the data is numerical data in the binary file.  That was actually surprising as I expected there would be more of a difference.  Any ideas on how to get the binary data to read at a faster rate would be great.
    • By KimberlyJillPereira
      May I know how to copy the first 10 characters in excel and paste it in the file explorer textbox? How to do? I know that you show use the StringLeft() function but I am not sure how to do. Please help me. Thank you! 

    • By FrancescoDiMuro
      Good morning
      I was trying to replace 2 identical characters from a string, but I didn't manage to with StringReplace()...
      Does anyone know how to replace two ( i.e. : """" with ";" ) ? 
  • Create New...