Jump to content

azrael_11

Members
  • Content Count

    21
  • Joined

  • Last visited

Everything posted by azrael_11

  1. Hello i manage to send an HTML e-mail with formations but i can't add background color to main body. I try this with css but not working // This is for adding repeating image in background of body vHTMLBuild.HtmlFiles.Add(vBackground, 'back.png'); //vHTMLBuild.HtmlFiles.Add(vLogo, 'logo.png'); vHTMLBuild.Html.Add('<html>'); vHTMLBuild.Html.Add('<head>'); vHTMLBuild.Html.Add('<style>body {'+ 'background-image: url("back.png");'+ 'background-repeat: repeat;'+ 'background-color: #cccccc;'+ '}</style>'); vHTMLBuild.Html.Add('</head>'); vHTMLBuild.Html.Add('<body>'); vHTMLBuild.Html.Add('</body>'); vHTMLBuild.Html.Add('</html>'); and this // This is for adding only background color // vHTMLBuild.HtmlFiles.Add(vBackground, 'back.png'); // vHTMLBuild.HtmlFiles.Add(vLogo, 'logo.png'); vHTMLBuild.Html.Add('<html>'); vHTMLBuild.Html.Add('<head>'); vHTMLBuild.Html.Add('<style>body {'+ '{background-color: coral; '}</style>'); vHTMLBuild.Html.Add('</head>'); vHTMLBuild.Html.Add('<body>'); vHTMLBuild.Html.Add('</body>'); vHTMLBuild.Html.Add('</html>'); Thank you.
  2. azrael_11

    TIdMessageBuilderHtml add background color

    Remy this is a hell good Guide, it helps a lot. In the 1st your are right i miss that. In the 2nd case i forgot some " '+" so yes it is broken. Thank you.
  3. azrael_11

    Shellexecute cmd.exe with spaces

    Hello.. When i execute this command var program_path: string; begin program_path:= c:/myprogram.exe ShellExecute(0, nil, 'cmd.exe', PChar('/C ' + program_path+ ' -fg'), PChar(program_path), SW_HIDE); but when the program_path have a space like a "New folder" var program_path: string; begin program_path:= c:/New Folder/myprogram.exe ShellExecute(0, nil, 'cmd.exe', PChar('/C ' + program_path+ ' -fg'), PChar(program_path), SW_HIDE); Then nothing happens . I try this ShellExecute(0, nil, 'cmd.exe', PChar(AnsiQuotedStr('/C ' + program_path+ ' -fg', Char(34))), PChar(program_path), SW_HIDE); Nothing.
  4. azrael_11

    Rest question (Newbie)

    Hi I Create an app for windows and i try to add forecast results on it. I use the Yahoo weather api but recently even the free access goes to oauth1 Authorization. here what Yahoo wants to access forecast results. GET /forecastrss?location=sunnyvale,ca HTTP/1.1 Host: weather-ydn-yql.media.yahoo.com Yahoo-App-Id: YOUR_APP_ID Authorization: OAuth oauth_consumer_key="YOUR_CONSUMER_KEY",oauth_signature_method="HMAC-SHA1",oauth_timestamp="YOUR_TIMESTAMP",oauth_nonce="YOUR_NONCE",oauth_version="1.0",oauth_signature="YOUR_GENERATED_SIGNATURE" cache-control: no-cache I go to REST Debugger tool provide by emb I add the get method in method url like this http://weather-ydn-yql.media.yahoo.com/forecastrss?w=2502265 I select the from authentication the method oauth 1 and i put my Client-ID and the Client-Secret and select the HMAC-SHA1 from OAuth-Assistant. Now how can i add Timestamp, oauth_nonce, BCS when i execute the request i get Connection=keep-alive Date=Fri, 18 Jan 2019 08:32:06 GMT Via=http/1.1 media-router-omega65.prod.media.bf1.yahoo.com (ApacheTrafficServer [cMsSf ]) Content-Length=0 Content-Type=application/json;charset=UTF-8 Age=0 Server=ATS WWW-Authenticate=OAuth oauth_problem="OST_OAUTH_SIGNATURE_INVALID_ERROR", realm="yahooapis.com" //here i get an error X-Frame-Options=SAMEORIGIN X-Content-Type-Options=nosniff X-XSS-Protection=1; mode=block Referrer-Policy=no-referrer-when-downgrade Thank you.
  5. azrael_11

    Rest question (Newbie)

    Maybe something like this in C++ code String signatureString = "GET&" + URLEncoder.encode(url, "UTF-8") + "&" + URLEncoder.encode(parametersList.toString(), "UTF-8"); Thank you
  6. azrael_11

    Rest question (Newbie)

    This is the official String signature generator that taken from C++ code form Yahoo. But i cant translated to delphi code. String signature = null; try { SecretKeySpec signingKey = new SecretKeySpec((consumerSecret + "&").getBytes(), "HmacSHA1"); Mac mac = Mac.getInstance("HmacSHA1"); mac.init(signingKey); byte[] rawHMAC = mac.doFinal(signatureString.getBytes()); Encoder encoder = Base64.getEncoder(); signature = encoder.encodeToString(rawHMAC); } catch (Exception e) { System.err.println("Unable to append signature"); System.exit(0); } Thank you
  7. azrael_11

    Rest question (Newbie)

    Finally i use the simple method of indy IdHTTP.get method to get result. But i don't know how to GENERATE SIGNATURE Any ideas... Thank you.
  8. azrael_11

    Particle system FMX

    Hell and happy new year. 2019 may be great year for delphi developers. First question of the year for me. Is out there and particle system for FireMonkey either 2D or 3D, free? I really make use of that for my program. Thank you.
  9. azrael_11

    Particle system FMX

    Thank you ill check that.
  10. azrael_11

    Virtual Box with MacOsx PAServer

    Hi I manage to setup a virtual box MacOsX high sierra machine I setup the network so the ip is always the 192.168.2.100 I run the paserver. The ip i get when i execute the i command is the above 192.168.2.100 The port i get when i execute the p command is the 64211 I put this settings in the main machine and it fails ... Someone solve this.... Thank you.
  11. azrael_11

    Virtual Box with MacOsx PAServer

    Finally i get it. The only thing is to reboot my pc and add bridged again and it works just fine. Thank you all.
  12. azrael_11

    Virtual Box with MacOsx PAServer

    I try almost all and Nat and briged nothing Do you know how can i know if my virtual machine is at my home network? Thank you.
  13. azrael_11

    Shellexecute cmd.exe with spaces

    I think you are right about this so i make a process to call that... Thank you.
  14. azrael_11

    Shellexecute cmd.exe with spaces

    That work just fine. Thank you.
  15. azrael_11

    Shellexecute cmd.exe with spaces

    I try this ShellExecute(0, nil, 'cmd.exe', PChar(AnsiQuotedStr('/C ' + program_path, Char(34))+ ' -fg'), PChar(program_path), SW_HIDE); Nothing, not working.
  16. azrael_11

    Hook keyboard and mouse

    Hi Try to find any good tutorial or sample code how to make a global hook for keyboard and mouse. Thank you.
  17. azrael_11

    Hook keyboard and mouse

    Thank you. I'll try this.
  18. azrael_11

    Hook keyboard and mouse

    I forget a lot so let me begin Not a logger i try to make something like this. When a user hit a key to another program i want to know what key is and make my procedure. Example : When run a game emulator like MAME when the user hit "t" in the keyboard when plays in mame i want to exit mame not execute the mame command that have in "t" key. So i can make a map of keys like arrow left to use it the joystick left. i hope i give you understand about that. The platforms i want to go is Win64, win32, MacOsx ... for now. I use the Delphi 10.2.3 Tokyo . FMX Platform. Thank you.
  19. azrael_11

    TImagelist dynamic.

    Hello To our new home and hope last longer I have a question... I am working on an FMX Program and try to create a TImageList Dynamic and add Images into the "List of Images" so i can call the image from the Tstringgrid cell with the number ... Do you know how can i do this ? Thank you.
  20. azrael_11

    TImagelist dynamic.

    After a few search i found a helper for the Imagelist and it is work just fine. Here the code below type TImageListHelper = class Helper for TImageList function Add(const ABitmap: TBitmap): integer; end; implementation function TImageListHelper.Add(const ABitmap: TBitmap): integer; const Scale = 1; var vSource: TCustomSourceItem; vBitmapItem: TCustomBitmapItem; vDest: TCustomDestinationItem; vLayer: TLayer; begin Result := -1; if (ABitmap.Width = 0) or (ABitmap.Height = 0) then exit; // add source bitmap vSource := Source.Add; vSource.MultiResBitmap.TransparentColor := TColorRec.Fuchsia; vSource.MultiResBitmap.SizeKind := TSizeKind.Source; vSource.MultiResBitmap.Width := Round(ABitmap.Width / Scale); vSource.MultiResBitmap.Height := Round(ABitmap.Height / Scale); vBitmapItem := vSource.MultiResBitmap.ItemByScale(Scale, True, True); if vBitmapItem = nil then begin vBitmapItem := vSource.MultiResBitmap.Add; vBitmapItem.Scale := Scale; end; vBitmapItem.Bitmap.Assign(ABitmap); vDest := Destination.Add; vLayer := vDest.Layers.Add; vLayer.SourceRect.Rect := TRectF.Create(TPoint.Zero, vSource.MultiResBitmap.Width, vSource.MultiResBitmap.Height); vLayer.Name := vSource.Name; Result := vDest.Index; end; Thank you for help
  21. azrael_11

    TImagelist dynamic.

    Thank you i'll try this..
×