Jump to content

jorgeng

Active Members
  • Posts

    120
  • Joined

  • Last visited

Everything posted by jorgeng

  1. I am trying to choose jg1standard in dropdown box but autoit script is choosing another value, what's wrong? ControlCommand("Autopro", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.378734a;INSTANCE:2]", "ShowDropDown") Sleep(1000) ControlSend("Autopro", "", "[CLASS:WindowsForms10.COMBOBOX.app.0.378734a;INSTANCE:2]", "jg1standard")
  2. Ok, but what is the command to click on the close button in upper right corner after done: WinActivate("[CLASS:WindowsForms10.Window.8.app.0.378734a]", "") ?
  3. When i use winclose there is no yes/no popup option available... attached screenshot show values for button no = 2
  4. I have a stock program which has to be closed manually every workday when us stock market ends at evening. I shut down computer at night with airytec switch off automatic and then important values ain't written down to disk and the result when opening program next workday is that there is not correct values which was created yesterday. Winclose won't work since i have to manually click yes (question if i want to close the program) I know the class from autoit3 window info. What will i use to close a program at kl.22.30 and click yes in windows box so values is written to disk?
  5. Thanks, doesn't really works. I have tried to slow down mouse click, but doesn't work.
  6. The boss comes..
  7. Is it possible to hide all internet explorer windows in autoit by double-klicking left and right mouse buttons at the same time?
  8. It seems like the result is 1021.0 from 1021.20 and 1021.5 from 1021.55, not 1021.50 as i want How do i do to get two digits?
  9. Thanks, works great...
  10. Hello. I have used this code which works great when price is 1021.00, 1021.25, 1021.50, 1021.75 and 1022.00. Now i get strange price from ticket-delivery trading firm meaning prices as 1021.15, 1021.35, 1021.55. This ticket-size shouldn't be able to exist but they do so i have to code something which delivers only output courses as 1021.00, 1021.25, 1021.50, 1021.75 and 1022.00. This is swedish crona which only shall have this 25 öre ticket sizes. I have to code something as only give output at even 25 öre meaning that if price is 1021.00 -> 1021.24 the output price should be 1021.00 if price is 1021.25 -> 1021.49 the output price should be 1021.25 if price is 1021.50 -> 1021.74 the output price should be 1021.50 if price is 1021.75 -> 1021.99 the output price should be 1021.75 if price is 1022.00 -> 1021.24 the output price should be 1022.00 Can anyone help me coding this.. ; Kolla om Köp $result_ObiWan = StringInStr($var_original, "Entry Long") If $result_ObiWan < 43 And $result_ObiWan > 0 Then ; Lägg på 0.5 punkter om Köp trade ; $sStr = '15:47 ORDER "sl) Omx ObiWan - Köp Trade - Grön - Krypterat OMXS300G" kurs 1021.00' $a=StringRegExp($new,"kurs (\S*)",1) $b = $a[0] + .50 If Not StringInStr($b,".") Then $b &= ".00" $c = StringReplace($new,$a[0],$ ; ConsoleWrite($c & @LF) EndIf
  11. I just want a simple replace of string since i shall delete file and do filewrite with new content... It seems that it has to be simple text in StringReplace($sData not accepting $sData
  12. I want to replace a word in a string read from file but can't get it to work, can someone see what's wrong? $trade_original is empty after replace... #Include <File.au3> $file_Omx_Wampa_PHP_Mangold = FileOpen("C:\Filer\Rankor System\Omx_Wampa_Trades_PHP_Mangold.txt", 0) ; Check if file opened for reading OK If $file_Omx_Wampa_PHP_Mangold = -1 Then MsgBox(0, "Error", "Unable to open file Omx_Wampa_PHP_Mangold.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $sData = FileReadLine($file_Omx_Wampa_PHP_Mangold) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $sData) Wend ; $sData = '10:16 ORDER "sl) Omx Wampa - Entry Short - Kl.10 - Röd - Okrypterat OMXS300I" kurs 1050.0000$' $trade_original = StringReplace($sData, "Entry", "Exit") ConsoleWrite("1=" & $trade_original & @CRLF)
  13. Thank you. You saved my day..
  14. In time-range 0900 to 1724 i want to write data to a file In time-range 1725 to 2355 i want to have a message box
  15. I want to write some text to a file if clock is after 09.00 and before 17.25. At 17.25 i don't want to write to the file. I think your solution is good meaning that if clock is 17 and minute is less than 25 i can put up a message box. How to do between 09 and 17.24 writing to file in your code?
  16. Ok, but the problem is that i need to have 17.24 in one string to calculate with. >09 is true at 10, 11, 12 and so on <25 is true at 1,2,3 and so on to 24.
  17. I want to do one thing if clock is before 17.25 and another thing if it is after 17.25. I have tried this but this hour minute is complex, can be wrong. The problem is that 09 is true every hour and minute 25 true in 1-24, so how to check if clock is before 17.25? #include <Date.au3> If @HOUR >= 09 And @MIN < 25 Then If @HOUR < 18 And @MIN < 25 Then MsgBox(0, "Check","Check ok",5) EndIf Endif
  18. Thanks. Works fine.
  19. One small problem, when price is 1012.50 and script will subtract 0.50 the result becomes 1012 and i want 1012.00 How to fix this?
  20. Thanks, works great.
  21. Thanks everybody. They all works, but i want to have the result replaced in original string, how to do that? Now the string looks like: 15:47 ORDER "sl) Omx Sarlacc - Sälj Trade - Rosa - Krypterat OMXS300G" kurs 1012.75 and i want 15:47 ORDER "sl) Omx Sarlacc - Sälj Trade - Rosa - Krypterat OMXS300G" kurs 1012.25 How to do that?
  22. I have a string which looks like this: 15:47 ORDER "sl) Omx Sarlacc - Sälj Trade - Rosa - Krypterat OMXS300G" kurs 1012.75 I want to subtract 0.50 to 1012.75 giving me 1012.25. Is this possible to do in a calculation string? Above is just an example, the numbers can be others and change often.
  23. Thanks, I try this, seems simplier since all lines has the same syntax.
  24. I have a string in a file which is like this: 17:24 ORDER "sl) Omx Sarlacc - Nollställ Depå - Krypterat OMXS300F" kurs 1045.7500$ I want to cut two zeroes after the price meaning i want the string to look like this: 17:24 ORDER "sl) Omx Sarlacc - Nollställ Depå - Krypterat OMXS300F" kurs 1045.75$ I write the string to a file today by doing this and want now to write the file without four digits, just two digits, anyone having an idea how to cut two digits? FileDelete("C:\Filer\Rankor System\Omx_Sarlacc_Trades_PHP_Mangold.txt") $file_Omx_Sarlacc_PHP_Mangold = FileOpen("C:\Filer\Rankor System\Omx_Sarlacc_Trades_PHP_Mangold.txt", 1) ;Check if file opened for writing OK If $file_Omx_Sarlacc_PHP_Mangold = -1 Then MsgBox(4096, "Error", "Unable to open file Omx_Sarlacc_PHP_Mangold.",2) Exit FileWrite($file_Omx_Sarlacc_PHP_Mangold, $var_original) ;MsgBox(4096, "Trade", $file_Omx_Sarlacc_PHP_Mangold) FileClose($file_Omx_Sarlacc_PHP_Mangold)
×
×
  • Create New...