Jump to content

Send() from INI file


nitekram
 Share

Recommended Posts

This does not happen every single time, but does happen about 40%. Happens all the time if you press the SHIFT before the ALT key

I press the hotkey and it sends its info to notepad (must be open first - by end user) - but after you scip a line or two the first character of the first key is missing - I put a sleep in to see if it helped, but it did not.

Does anyone know if I did something wrong?

; Press Alt-Shift-q to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("!+q", "Terminate")                 ;Alt-Shift-q
HotKeySet("!+r", "ShowMessageReader")  ;Alt-Shift-r
HotKeySet("!+c", "ShowMessageCamera")  ;Alt-Shift-c
HotKeySet("!+a", "ShowMessageAccess")  ;Alt-Shift-a
HotKeySet("!+g", "ShowMessageGate")    ;Alt-Shift-g

;;;; Body of program would go here ;;;;

If Not FileExists(@ScriptDir & "/ScriptHelp.ini") Then
    MsgBox('', "Missing File ScriptHelp.ini", "Please see Customer Support Supervisor", 5)
    Exit
EndIf


While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Func ShowMessageReader()
    $vReader = IniReadSection(@ScriptDir & "/ScriptHelp.ini", "Reader")
    If @error Then
        MsgBox(4096, "", "Error occurred, probably no INI file.")
    Else
        For $i = 1 To $vReader[0][0]
            sleep(10)
            Send($vReader[$i][1] & @CR)
        Next
    EndIf
EndFunc   ;==>ShowMessageReader

Func ShowMessageCamera()
    $vCamera = IniReadSection(@ScriptDir & "/ScriptHelp.ini", "Camera")
    If @error Then
        MsgBox(4096, "", "Error occurred, probably no INI file.")
    Else
        For $i = 1 To $vCamera[0][0]
            sleep(10)
            Send($vCamera[$i][1] & @CR)
        Next
    EndIf
EndFunc   ;==>ShowMessageCamera

Func ShowMessageAccess()
    $vAccess = IniReadSection(@ScriptDir & "/ScriptHelp.ini", "Access")
    If @error Then
        MsgBox(4096, "", "Error occurred, probably no INI file.")
    Else
        For $i = 1 To $vAccess[0][0]
            sleep(10)
            Send($vAccess[$i][1] & @CR)
        Next
    EndIf   
EndFunc   ;==>ShowMessageAccess

Func ShowMessageGate()
    $vGate = IniReadSection(@ScriptDir & "/ScriptHelp.ini", "Gate")
    If @error Then
        MsgBox(4096, "", "Error occurred, probably no INI file.")
    Else
        For $i = 1 To $vGate[0][0]
            sleep(10)
            Send($vGate[$i][1] & @CR)
        Next
    EndIf   
EndFunc   ;==>ShowMessageGate

Here is the ini file

[Reader]
1= Reader is not working
2= When client presents cards the reader is not beeping - stays RED

[Camera]
1= Camera is not working
2= Cam #  is not working - color of monitor =

[Access]
1= Access Control is not working
2= Client is not able to access the door located - 

[Gate]
1= Gate is not working
2= Gate is not performing - issue is with gate #  - the issue is

EDIT - further testing shows that it happens all the time if the SHIFT key is hit before the ALT key

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

maybe...

Send($vReader[$i][1] & @CR, 1)

where the "1" states to send "Raw"

???

8)

That does not work - but I found what I was doing, but how do I fix it.

The hotkey is set for ALT - SHIFT - 'letter' - if I press SHIFT - ALT - 'letter' - it still works but misses the first letter of the first key. Is there a fix for this?

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

MODS - can this be looked at as a BUG - I can make it happen 100% of the time if I hit SHIFT first in my code followed by the ALT then the letter.

In other hotkeys like CTRL ALT DEL you can hit either the ALT or CTRL first and get the command to work - but not hit DEL first.

Also I tried to switch the hotkey to SHIFT - ALT - 'letter' and use MS Word - it looses even more characters.

EDIT - Or maybe there needs to be documentation for the use of these - maybe it is not possible?

Edited by nitekram

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
Share on other sites

MODS - can this be looked at as a BUG

do you really expect the "MODS" to read every thread?? Write some sample code that shows the possible bug and post in the "v3 Bug Reports" forum.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

do you really expect the "MODS" to read every thread?? Write some sample code that shows the possible bug and post in the "v3 Bug Reports" forum.

Cheers

Kurt

OK

All by me:

"Sometimes you have to go back to where you started, to get to where you want to go." 

"Everybody catches up with everyone, eventually" 

"As you teach others, you are really teaching yourself."

From my dad

"Do not worry about yesterday, as the only thing that you can control is tomorrow."

 

WindowsError.gif

WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF

AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send

StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2

AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit  Docs

SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF

Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language

Programming Tips

Excel Changes

ControlHover.UDF

GDI_Plus

Draw_On_Screen

GDI Basics

GDI_More_Basics

GDI Rotate

GDI Graph

GDI  CheckExistingItems

GDI Trajectory

Replace $ghGDIPDll with $__g_hGDIPDll

DLL 101?

Array via Object

GDI Swimlane

GDI Plus French 101 Site

GDI Examples UEZ

GDI Basic Clock

GDI Detection

Ternary operator

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...